Hi
I am trying to host a Joomla! site using nginx and FastCGI. It works, for the most part, except for one thing (which is actually more of an annoyance): when in the administrator section of the site, whenever editing a component that you have to click Save or Cancel or any other buttons of finalization (e.g. copying a menu, saving an article, etc.), the action takes effect, but instead of being redirected back to the list of items (or whatever), I get a "Component not found" error. The problem, upon observation of the URL, is obvious: the "administrator/" part of the URL had been dropped. In other words, what was supposed to be "http://xxx.xxx.xxx.xxx/administrator/index.php?various_args" is now "http://xxx.xxx.xxx.xxx/index.php?various_args". Below is the nginx config for my site.
Code:
server {
listen 80;
client_max_body_size 50M;
server_name localhost;
root /var/www/cmstest/joomla;
access_log /var/log/nginx/cmstest.access.log;
error_log /var/log/nginx/cmstest.error.log;
location / {
index index.html index.php;
expires max;
break;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/cmstest/joomla$fastcgi_script_name;
include /etc/nginx/fastcgi.conf;
expires max;
}
error_page 500 502 503 504 /50x.html;
location = /500.html { root /var/www/cmstest; }
}
The fastcgi.conf file referenced is:
Code:
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
Is this a rewrite issue? I've tried playing around with some stuff (if ($request_uri ~* administrator/.*\.php$) { fastcgi_param SCRIPT_NAME /path/to/root/administrator$fastcgi_script_name; }), but to no avail (and, in fact, more problems). If you need more information, let me know!
Thanks,
Syd