I have set up a LAMP server and I have access via SSH and to the "it works" page from a web browser from inside my network (via ip address) and from outside using dyndns.
We have some Wordpress projects that sit in subdirectories in /var/www/wordpress1 /var/www/wordpress2, etc. I cannot access these sub directories from a browser in order to set up WP--or (I assume) to see the content on a browser. I get a 403 Forbidden error on my browser.
I assume that this is a permissions problem. Can you please tell me the proper settings for the permissions to:
- Allow the developers and me to read/write.
- to allow WP set up and do its thing
- Allow visitors to access the site(s) via the web.
I should also mention that the subfolder are actually simlinks to folder on another internal hdd--I don't think this will make a difference, but I thought I should disclose.
total 12
drwxr-xr-x 2 root root 4096 2012-07-12 10:55 .
drwxr-xr-x 13 root root 4096 2012-07-11 20:02 ..
lrwxrwxrwx 1 root root 43 2012-07-11 20:45 admin_media -> /root/django_src/django/contrib/admin/media
-rw-r--r-- 1 root root 177 2012-07-11 17:50 index.html
lrwxrwxrwx 1 root root 14 2012-07-11 20:42 media -> /hdd/web/media
lrwxrwxrwx 1 root root 18 2012-07-12 10:55 wordpress -> /hdd/web/wordpress
Here is the result of using chown -R www-data:www-data /var/www
total 12
drwxr-xr-x 2 www-data www-data 4096 2012-07-12 10:55 .
drwxr-xr-x 13 root root 4096 2012-07-11 20:02 ..
lrwxrwxrwx 1 www-data www-data 43 2012-07-11 20:45 admin_media -> /root/django_src/django/contrib/admin/media
-rw-r--r-- 1 www-data www-data 177 2012-07-11 17:50 index.html
lrwxrwxrwx 1 www-data www-data 14 2012-07-11 20:42 media -> /hdd/web/media
lrwxrwxrwx 1 www-data www-data 18 2012-07-12 10:55 wordpress -> /hdd/web/wordpress
I am still unable to access via browser.
ls -la /var/www
.chown -R www-data:www-data /var/www
/hdd/web/wordpress
would be to configure Apache (root directory) properly. You can configure apache to use links, but I do not advise it. See also help.ubuntu.com/community/WordPress