Setting up localhost urls to subfolders
I have a Mac running Lion. Before I did a clean install of Lion, I had a system setup where http://localhost/ went to my "Users/username/Sites" directory and http://localhost/db/ went to my "Users/username/Dropbox/sites" directory. This allowed me have a local and shared version of some sites I was working on both at home and at work. I can't for the life of me remember how I set it up!!! Can anyone offer any pointers? I've got the localhost working fine, but the Dropbox redirect isn't working at all. I've added the following to the httpd.conf:
Alias /db "/Users/username/Dropbox/sites"
<Directory "/开发者_JAVA技巧Users/username/Dropbox/sites">
Options All Multiviews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
But it doesn't work. I can tell it's doing something, because without this configuration code in the httpd.conf I get a "Not found" error when I try and access http://localhost/db. When I add it in, I get a 403 error.
Any help would be much appreciated!
T
Stupid. Should have thought of it. I needed to set the permissions on the parent directory (Dropbox) too. Just chmod them to 755 and it worked.
As you were people! Thanks to @Rueckmeldung on Twitter for asking lots of questions to get the gears turning.
T
精彩评论