I'm trying to set up a VirtualHost on my AWS EC2 Linux server. However, it continues to direct the request to the default page.
I've installed apache and when I create an index file in /var/www/html/
it displays as expected.
However, when I add a *.conf
virtual host it just reverts the default page.
I've created my /etc/httpd/conf.d/{myvhost.conf}
file:
<VirtualHost *:80>
DocumentRoot "/home/username/www/public"
ServerName ec2-13-55-0-7.ap-southeast-2.compute.amazonaws.com
</VirtualHost>
The document root has been created at /home/username/www/public and I've added a custom index.html
file, perms set to 755.
IncludeOptional conf.d/*.conf
is uncommented in /etc/httpd/conf/httpd.conf
Restarted apache.
But default page is displayed and not my /home/username/www/public
.
Why?