I am attempting to setup websites on an Apache VirtualHost.
My VirtualHost configuration is included in /etc/httpd/conf/httpd.conf and is the following:
<VirtualHost *:80>
ServerName test.site.com
ServerAlias test.site.com test.site-london.com
DocumentRoot /var/www/site-dev
<Directory /var/www/site-dev>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
My problem is when I visit test.site.com or test.site-london.com , I get a Oops! Google Chrome could not find test.site.com message. Instead, the websites are accessible when I utilize the IP address like in the following format: 172.54.88.203/test.site.com . A bit more confusingly, test.site.com is what I see if I just typed the IP address into the address bar and push enter.
I tried setting up my /etc/hosts file with the following input but it still does not work properly:
127.0.0.1 localhost localhost
172.54.88.203 test.site.com test.site.com
Have you uncommented NameVirtualHost *:80 in httpd.conf?
If this is commented out Virtual Host will not work.
Please check if it is commented and get back to me, it is near the end of the https.conf
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.