I just transferred my Joomla installation to DigitalOcean and i'm running on nginx. Site seems to be running fine but when I login to the administrator portion and try to update something in the global configuration i get the following error:
2014/06/26 10:08:38 [error] 19654#0: *1035 FastCGI sent in stderr: "PHP message: PHP Warning:
file_put_contents(/usr/share/nginx/projects/hoopsforu/configuration.php): failed to open stream
: Permission denied in /usr/share/nginx/projects/hoopsforu/libraries/joomla/filesystem/file.php
on line 426" while reading response header from upstream, client: 70.208.86.53, server: hoopsf
oru.com, request: "POST /administrator/index.php?option=com_config HTTP/1.1", upstream: "fastcg
i://127.0.0.1:9000", host: "hoopsforu.com", referrer: "http://hoopsforu.com/administrator/index
.php?option=com_config"
2014/06/26 10:08:38 [error] 19654#0: *1035 upstream sent invalid status "0 Could not write to t
he configuration file" while reading response header from upstream, client: 70.208.86.53, serve
r: hoopsforu.com, request: "POST /administrator/index.php?option=com_config HTTP/1.1", upstream
: "fastcgi://127.0.0.1:9000", host: "hoopsforu.com", referrer: "http://hoopsforu.com/administra
tor/index.php?option=com_config"
This is what my config looks like:
server {
listen 80;
server_name hoopsforu.com www.hoopsforu.com;
server_name_in_redirect off;
root /usr/share/nginx/projects/hoopsforu;
index index.php index.html index.htm default.html default.htm;
# Support Clean (aka Search Engine Friendly) URLs
location / {
try_files $uri $uri/ /index.php?$args;
}
# deny running scripts inside writable directories
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi.conf;
}
# caching of files
location ~* \.(ico|pdf|flv)$ {
expires 1y;
}
location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
expires 14d;
}
}
.htaccess
file?