I am trying to create a web development setup on Ubuntu 12.04 and am running into a snag...
I installed the LAMP server using tasksel and confirmed that Apache works.
In another thread, I mentioned that I wanted to have the files located in some place in my /home directory (so could be synchronized, easily edited, etc.) and was recommended to create a symbolic link to my local files
Code:
cd /var/www && sudo ln -s /home/drew/Dropbox/Documents/programming/code/webdev
This worked in putting a symbolic link (/var/www/webdev), but Apache doesn't have the permissions necessary it seems to display any of the content, even straight HTML pages. I get an authorization error, so I know it "sees" it but just cannot display or run it.
The folders under /var are owned by root:root, but my local versions are owned by me (drew:drew). The directory appears to include rw+x permissions for owner and group (r+x only for the last).
How can I handle the permissions so that I can edit the files locally and have Apache be able to read, use and execute the pages? Keep in mind that the local files are in a Dropbox folder and gets synchronized and edited on other systems as well.
If I have to make a change to httpd.conf, how is the best way to do this? I am not familiar with configuring apache for virtual directories and aliases. I am not sure if this would work for making localhost/drew (or is it drew.localhost?):
Code:
Alias /drew /home/drew/Dropbox/Documents/programming/webdev
<Directory /home/drew/Dropbox/Documents/programming/webdev>
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride None
order allow,deny
allow from all
</Directory>
(link)
Which method would your recommend? Why?
Bookmarks