OK, this is a bit tricky to explain, but I'll do my best.
I'm running Apache in a VM (Windows XP Mode), and I want to:
- Store and edit website files on my main machine (host)
- Serve them to the browser within the VM (guest)
Currently, I'm storing, editing and serving everything in the VM, but obviously this is useless for backup, git, etc, so I want to get them out of the virtual machine and into physical directories.
My VM hosts file currently points all domains to to 127.0.0.1:
127.0.0.1 davestewart.local 127.0.0.1 davestewart.remote
My VM Apache httpd-vhosts.conf file looks like this:
NameVirtualHost *:80 <VirtualHost *:80> ServerName localhost DocumentRoot "c:/xampp/htdocs" </VirtualHost> <VirtualHost *:80> ServerName davestewart.local ServerAlias www.davestewart.local DocumentRoot "c:/xampp/htdocs/davestewart.co.uk" <Directory "c:/xampp/htdocs/davestewart.co.uk"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerName davestewart.remote DocumentRoot "//dave-desktop/work" <Directory "//dave-desktop/work"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
The .local version of the site runs just great, and is fully viewable in the VM, but the .remote version outputs a XAMPP 403 Access forbidden! page.
My server skills extend to some .htaccess and .conf editing, usually hacking stuff together from online tutorials, but with no real knowledge of what I'm doing (unlike coding, which I find much easier).