LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Some Joomla administration links give "Component not found" with nginx (https://www.linuxquestions.org/questions/linux-server-73/some-joomla-administration-links-give-component-not-found-with-nginx-669771/)

sydney-troz 09-13-2008 07:42 PM

Some Joomla administration links give "Component not found" with nginx
 
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

chetanmadaan 09-22-2009 02:43 AM

solution.
 
do you have a solution for this..


i am having the same kind of problem right?

Thanks!

Revy 10-29-2009 04:36 PM

Just for the record if anyone has the same issue.

I had the same problem, Joomla uses $_SERVER['PHP_SELF'] and $_SERVER['SCRIPT_NAME'] to retrieve the path to files. If you commented out the following line in /etc/nginx/fastcgi_params then you have to uncomment it:

Code:

fastcgi_param SCRIPT_NAME $fastcgi_script_name;
When uncommented everything worked fine on my server.

Revy 10-29-2009 04:37 PM

For info it's the same problem I have discussed on the nginx forums:
http://forum.nginx.org/read.php?11,10324


All times are GMT -5. The time now is 03:38 AM.