I recently started use xampp vm ! I want to connect my project exist in /Users/mine/project . So I tried with vhost from /opt/lampp/etc/extra/httpd-vhosts.conf ,that is open by xampp application volumes tab Explore.
<VirtualHost *:80>
DocumentRoot "/Users/mine/project"
ServerName mine.online
</VirtualHost>
Then I update hosts file from terminal like below,
192.168.64.2 mine.online //192.168.6.2 is xampp vm ip
Also I do uncomment in /opt/lampp/etc/httpd.conf
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
Finally I restarted my apache ! But it show me 404 not found . Please help me how to run correctly ?
Plus => is there any way to clone git project to xampp vm 's htdocs folder ?
I'm not familiar with this XAMPP-VM setup. But it looks like the linux machine hosting lamp, cannot access local (your physical machine) datas. So /Users/mine/project is out of scope. It looks like you cannot add a new mounted folder.
At the moment there is only a mounted folder for the /opt/lampp accessible from your host. This folder include your root web folder so you can store the files and add a new VirtualHost with this path .. /opt/lampp/../your-amazing-project/public..
I think that this particular setup (with those file paths) cannot be done with XAMPP-VM. But I'm not sure.
You can look on projets like Valet if you want to serve and develop PHP projets in /Users/..
There are recommended for PHP projects with Laravel PHP framework.