Hello there,
I'm using XAMPP 7.3.7 on Mac OS as this is using VM Im facing following issue with it :
My IP on XAMPP: 192.168.64.9
Issue : Cannot declare Virtual Host Directory
Result Im expecting : I will type cms.test in browser and it will take me to the contents of directory /opt/lampp/htdocs/cms/public
Steps taken :
1. Changed host ip from default mac terminal by adding following in /etc/hosts
192.168.64.9 cms.test
2. Added Virtual Hosts in /opt/lampp/etc/extra httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "/opt/lampp/htdocs/cms/public"
ServerName cms.test
ErrorLog "logs/dummy-host2.example.com-error_log"
CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost>
Result Im getting : when im hitting cms.test it's taking me to root directory I mean to /opt/lampp/htdocs/