When using Virtual Host, where should I point my browser to?
I'm trying to set up Virtual Host for Example.com
. My understanding is that if all good, I have to point the browser to Example.com/phptest.php
in order to access page phptest.php
. But it's not working. On the other hand, if I point the browser to localhost/phptest.php
, it is returning the phptest.php
page.
The pertaining directory/files structure is as below.
ls -l /var/www/html/example.com/public_html
total 12
-rw-r--r-- 1 ubuntu ubuntu 203 Nov 25 14:49 index.html
-rw-r--r-- 1 ubuntu ubuntu 21 Nov 25 18:56 info2.php
-rw-r--r-- 1 ubuntu ubuntu 641 Nov 25 13:48 phptest.php
Any help will be appreciated.
127.0.0.1 example.com
in your/etc/hosts
file. – pa4080 Nov 26 '19 at 18:33