php/fastcgi + phpMyAdmin => Trailing Dot Issue

Igor Sysoev is at rambler-co.ru
Mon Feb 19 22:00:19 MSK 2007


On Mon, Feb 19, 2007 at 01:36:30PM -0500, Jonathan Dance wrote:

> Hopefully a stupid question, but I'm having weird behavior with using
> nginx + php/fastcgi + phpMyAdmin, where a trailing dot gets added to
> the hostname. I am using the standard php/fastcgi setup as described
> in the wiki[1], and am using 0.5.12 (Debian unstable). We are still
> using lighttpd itself to spawn the fcgi processes. The specific
> behavior is:
> 
> - Go to site where phpMyAdmin is hosted, e.g., 
> http://phpmyadmin.sitename.com/
> - Log in (using cookie auth)
> - Log in succeeds, but redirection occurs with trailing dot
> (http://phpmyadmin.sitename.com./). In Safari, this causes you to have
> to login again, since Safari considers it a different hostname for the
> cookie.
> 
> I think the issue is how phpMyAdmin is getting the current hostname
> from for the redirect. I am not really blaming nginx, but it did work
> normally under lighttpd, so I am wondering how to fix it.

Does the "hostname" command show hostname with a trailing dot ?
Is a "server_name" directive in nginx's phpmyadmin.sitename.com
"server {}" block ?

In the proxy mode nginx can rewrite the "Location" headers using

proxy_redirect   http://phpmyadmin.sitename.com./   /;

but there is no similar directive in FastCGI mode.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list