letharion
asked on
Apache access denied to directory
I've just moved a Drupal site from development to production environment.
The site itself works, but all images are "broken".
It seems that apache denies all access to the "files/" directory where all the images are.
As far as I can tell all URLs point where they should.
Potentially related is that
1) I renamed the site from www.domain.com to new.domain.com during the move, in order to test out the site on the live server before actually replacing the current one.
2) The site has been setup with aegir, and the settings.php replaced with a "normal" one, in order to solve this problem. Didn't help though.
I'm not sure what information to provide. My first idea was to look at the .htaccess file in the files dir, but it's really short:
SetHandler Drupal_Security_Do_Not_Rem ove_See_SA _2006_006
Options None
Options +FollowSymLinks
The site itself works, but all images are "broken".
It seems that apache denies all access to the "files/" directory where all the images are.
As far as I can tell all URLs point where they should.
Potentially related is that
1) I renamed the site from www.domain.com to new.domain.com during the move, in order to test out the site on the live server before actually replacing the current one.
2) The site has been setup with aegir, and the settings.php replaced with a "normal" one, in order to solve this problem. Didn't help though.
I'm not sure what information to provide. My first idea was to look at the .htaccess file in the files dir, but it's really short:
SetHandler Drupal_Security_Do_Not_Rem
Options None
Options +FollowSymLinks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
chown -R apache.apache *
First make sure the directory is owned by apache and group ownership belongs to apache :
> chown -R apache:apache /var/www/yourwebdir
# chmod 775 /var/www/yourwebdir
Should fix the problem.
> chown -R apache:apache /var/www/yourwebdir
# chmod 775 /var/www/yourwebdir
Should fix the problem.
Hi,
You can check the apache error logs to locate the exact reason. Run the following command as root.
tail -f /usr/local/apache/logs/err or_log
After that please try to access the page. You can see the exact error now. Paste the results here.
If the path "/usr/local/apache/logs/er ror_log" does not exist you may locate the error log using the command
locate error_log
Let me know if you have any questions.
You can check the apache error logs to locate the exact reason. Run the following command as root.
tail -f /usr/local/apache/logs/err
After that please try to access the page. You can see the exact error now. Paste the results here.
If the path "/usr/local/apache/logs/er
locate error_log
Let me know if you have any questions.
ASKER
Unfortunately I can't access the apache log on this host, and all files we're owned by the right user, but properly settings some file and directory permissions worked things out.
ASKER
doh!
That worked, for everything but a few files. I'm assuming the problem is something similar, I'm gonna look into it in more detail and I'll get back.
Thanks a lot :)