forked from sig_core/toolkit
26 lines
639 B
Bash
Executable File
26 lines
639 B
Bash
Executable File
#!/bin/bash
|
|
r_log "httpd" "Test basic vhost functionality"
|
|
|
|
echo "127.0.0.1 coretest" >> /etc/hosts
|
|
cat > /etc/httpd/conf.d/vhost.conf << EOF
|
|
## Core vhost test
|
|
NameVirtualHost *:80
|
|
<VirtualHost *:80>
|
|
ServerName coretest
|
|
ServerAdmin root@localhost
|
|
DocumentRoot /var/www/vhost/coretest
|
|
</VirtualHost>
|
|
EOF
|
|
|
|
mkdir -p /var/www/vhost/coretest
|
|
echo "core vhost test page" > /var/www/vhost/coretest/index.html
|
|
m_serviceCycler httpd cycle
|
|
|
|
curl -s http://coretest/ | grep -q 'core vhost test page' > /dev/null 2>&1
|
|
|
|
r_checkExitStatus $?
|
|
|
|
rm /etc/httpd/conf.d/vhost.conf
|
|
sed -i '/127.0.0.1 coretest/d' /etc/hosts
|
|
m_serviceCycler httpd reload
|