I just upgraded to OS X 10.8 Mountain Lion to find that my web server setup was ruined by the upgrade. I managed to get PHP and Apache back up and running, but I still do not have my old setup from Lion up and running. For my old setup, I used a shady technique in order to make Apache work with Dropbox; in
/Users/Andy/Sites/project1, I had a symbolic link, which pointed to
/Users/Andy/Dropbox/MyFolder/dev/project1. I found that I could not direct my virtual host to Dropbox directly (probably something with permissions that didn't work). However, it worked perfectly with a symbolic link. So in this way, I could store my projects in Dropbox and use my local Apache server.
After setting Apache up to work with my
Sites folder, I can now point my virtual hosts to sub folders in this directory and this works fine. However, when I try to point it to my symbolic link, I get a 403 Forbidden error. I really want to use Dropbox for my small projects where SVN or Git is overkill. Here is part of my configuration:
<VirtualHost *:80> ServerName test.dev DocumentRoot "/Users/Andy/Sites/project1" <Directory "/Users/Andy/Sites/project1"> DirectoryIndex index.php Options FollowSymLinks Indexes AllowOverride All Order deny,allow allow from All </Directory> </VirtualHost>
My symbolic link:
lrwxr-xr-x 1 Andy staff 59 Sep 30 12:01 project1 -> /Users/Andy/Dropbox/Myfolder/dev/project1/
/etc/apache2/users/Andy.conf (this seems to work fine since I can serve files from the
<Directory "/Users/Andy/Sites/"> Options Indexes MultiViews AllowOverride All Order allow,deny Allow from all </Directory>
I also get the same error if I don't use my virtual host, i.e.
Perhaps there is a better setup that does not involve symbolic links and still allows me to use Dropbox, and then I am very interested to know. Otherwise, does anyone have any idea how to solve this? I guess it's all about permissions, so which permissions should my
~/Dropbox/MyFolder/dev/project1 folder have? I am no good at permissions, but I tried to use
chmod a+rw project1 without any luck.
Thanks a lot in advance!