vhost.conf , located in etc/httpd/vhost.d/
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName localhost
ServerAlias localhost.example.com
DocumentRoot /var/www/html/example.com/public_html/
ErrorLog /var/www/html/example.com/logs/error.log
CustomLog /var/www/html/example.com/logs/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName example.org
ServerAlias www.example.org
DocumentRoot /var/www/html/example.org/public_html/
ErrorLog /var/www/html/example.org/logs/error.log
CustomLog /var/www/html/example.org/logs/access.log combined
</VirtualHost>
httpd.conf, settings on default, added onto end:
Include /etc/httpd/vhosts.d/*.conf
Root directories:
DocumentRoot "/var/www/html"
Respective directories for the virtual hosts created in above folder.
Permissions all look correct. Index.php file in each public_html
directory.
However when I punch in localhost now it just takes me to the default apache 2 page,
should I remove the line Include /etc/httpd/vhosts.d/*.conf
webserver works as
required from default directory, serving whichever index file I put there.