nginx, spawn-fcgi and php on freebsd - adding '/' incorrectly

khine nginx-forum at nginx.us
Mon Jan 31 00:05:18 MSK 2011


hi,

Maxim Dounin Wrote:
-------------------------------------------------------
> Hello!
> 
> On Sat, Jan 29, 2011 at 07:46:25PM -0500, khine
> wrote:
> 
> > hello, i have nginx setup, but i have a weird
> problem and i am unsure
> > whether it is to do with the application or
> something i messed up on the
> > nginx.conf file:
> 
> [...]
> 
> >                 fastcgi_param  SCRIPT_FILENAME 
> >
> /www/dev.editionsdelga.fr/1.3.6$fastcgi_script_nam
> e;
> >                 fastcgi_param SERVER_NAME
> $http_host;
> >                 fastcgi_ignore_client_abort on;
> >                 fastcgi_param  QUERY_STRING    
> $query_string;
> >                 fastcgi_param  REQUEST_METHOD  
> $request_method;
> >                 fastcgi_param  CONTENT_TYPE    
> $content_type;
> >                 fastcgi_param  CONTENT_LENGTH  
> $content_length;
> >                 }
> >         } # end server for dev.editionsdelga.fr
> > 
> > when you view the site, all links are missing
> the last '/' so instead of
> > getting
> http://dev.editionsdelga.fr/manufacturer.php
> > you get
> http://dev.editionsdelga.frmanufacturer.php/
> 
> You mean - links generated by php scripts on your
> site, right?  

no, because these are actual files on the server and are not generated
by my application.

[code]
# tree -L 1
.
|-- 404.php
|-- CHANGELOG
...
|-- js
|-- mails
|-- manage
|-- manufacturer.php
|-- modules
|-- my-account.php
|-- new-products.php
|-- order-confirmation.php
...
|-- tools
|-- translations
`-- upload

14 directories, 43 files
[/code]


> Most likely they need params you don't set in your
> config 
> (i.e. REQUEST_URI) to construct correct links.
> 
> It's really bad idea to set fastcgi_param's by
> hand unless you 
> understand what you are doing and have a good
> reason to.  Use 
> "include fastcgi.conf" instead.

ok, i will move this out.
> 
> Maxim Dounin
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,170721,170902#msg-170902




More information about the nginx mailing list