We have a new Centos server installed with Apache 2.4.9. I'm trying to get the vhost working. DNS resolves to the right machine, and I can see the default Apache page, so it's not a firewall issue and Apache runs.
/etc/httpd/conf/httpd.conf
Include conf.d/*.conf
/etc/httpd/conf.d/vhosts.conf
<VirtualHost *>
ServerName www.abctest.com
DocumentRoot /websites/abctest.com/htdocs
<Directory /websites/abctest.com/htdocs/public>
AllowOverride All
</Directory>
</VirtualHost>
ls /etc/httpd/modules
modules/mod_vhost_alias.so
website
In /websites/abctest.com/htdocs is an index.php file with helloworld in it. After restarting httpd, I still get the Apache page, not the helloworld text.
How can I get this working?
apachectl -S
which will dump your web server configuration in a quite readable format. Make sure that the vhost is listed, and if not, check to see why it isn't. The vhost will never work if it isn't included in that output.VirtualHost
could always take precedence to serve that FQDN, even if you define your ownVirtualHost
with the host FQDN as theServerName
.