LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 09-13-2008, 08:42 PM   #1
sydney-troz
Member
 
Registered: Feb 2007
Distribution: Kubuntu, it's obese barely-usable sibling, Ubuntu
Posts: 142
Thanked: 0
Some Joomla administration links give "Component not found" with nginx


[Log in to get rid of this advertisement]
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
sydney-troz is offline  
Tag This Post , ,
Reply With Quote
Old 09-22-2009, 03:43 AM   #2
chetanmadaan
LQ Newbie
 
Registered: Sep 2009
Posts: 1
Thanked: 0
solution.

do you have a solution for this..


i am having the same kind of problem right?

Thanks!
windows_xp_2003 chetanmadaan is offline     Reply With Quote
Old 10-29-2009, 05:36 PM   #3
Revy
LQ Newbie
 
Registered: Oct 2009
Posts: 2
Thanked: 0
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.
windows_xp_2003 Revy is offline     Reply With Quote
Old 10-29-2009, 05:37 PM   #4
Revy
LQ Newbie
 
Registered: Oct 2009
Posts: 2
Thanked: 0
For info it's the same problem I have discussed on the nginx forums:
http://forum.nginx.org/read.php?11,10324
windows_xp_2003 Revy is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone give me the definition of "Kernel Symbol" and "EXPORT_SYMBOL" ?? Raynus Programming 2 08-30-2008 08:19 PM
LFS6.3 - Ch5.4.1 "/bin/sh sort not found" error at "make bootstrap" ubyt3m3 Linux From Scratch 2 06-23-2008 01:09 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
"Essential System Administration" or "UNIX System Administration Handbook"? TGWDNGHN Linux - Newbie 3 07-03-2005 09:27 PM
some component missed after using "mandrake update" ??? kix_vn Mandriva 3 01-15-2004 10:06 AM


All times are GMT -5. The time now is 06:04 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration