Port_in_redirect

Hello !

I have Nginx 1.0.2 and port_in_redirect nginx doesn’t work …

This paramater work for you in this version ?

Many thanks,

Hello!

On Thu, Jun 09, 2011 at 08:05:05PM +0200, DUBOURG Kevin wrote:

Hello !

I have Nginx 1.0.2 and port_in_redirect nginx doesn’t work …

This paramater work for you in this version ?

Works ok here in 1.0.4 (too lazy to compile 1.0.2 just to test,
there were no changes in this area). What do you mean by “doesn’t
work”?

Maxim D.

Hello,

Thanks for your return. I have this virtual Host :

server {
listen 8088;
server_name XXXX.XXXX.fr;
port_in_redirect off;
server_name_in_redirect off;
access_log /var/log/nginx/phpmyadmin.access_log;
error_log /var/log/nginx/phpmyadmin.error_log;
root /var/www;

     location /phpmyadmin {
     alias   /var/www/phpmyadmin;
     index  index.php index.html index.htm;
     }

     index index.php;
     location ~* \.php$ {
             fastcgi_pass 127.0.0.1:9000;
             fastcgi_index index.php;
             fastcgi_param SCRIPT_FILENAME

$document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
}

When i go to http://xxx.xxxx.fr/phpmyadmin/, i’m login and click
“execute”.

Next i redirect to http://xxx.xxxx.fr:8088/phpmyadmin/index.php (it’s a
problem, because it’s behind a loadbalancer).

Normaly with port_in_redirect in my configuration, it should redirect to
http://xxx.xxxx.fr/phpmyadmin/index.php.

No ?

Le 09/06/2011 20:14, Maxim D. a crit :

Hello!

On Thu, Jun 09, 2011 at 08:23:33PM +0200, DUBOURG Kevin wrote:

    error_log /var/log/nginx/phpmyadmin.error_log;
            fastcgi_index index.php;

Normaly with port_in_redirect in my configuration, it should
redirect to http://xxx.xxxx.fr/phpmyadmin/index.php.

No ?

The redirect in question is one done by your php script, not
by nginx. Directive port_in_redirect won’t and shouldn’t affect
it.

There are two basic options to fix your redirects: either instruct
script to do correct redirects, or fool it via setting appropriate
fastcgi_param’s (setting fastcgi_param SERVER_PORT 80; instead of
real port should do the trick).

Maxim D.

It’s work !!

Thanks for your Help. I do that => http://wiki.phpmyadmin.net/pma/Config

A+

Le 14/06/2011 17:51, DUBOURG Kevin a écrit :

Hello,

I try to change :

fastcgi_param SERVER_PORT 80;

But i still have the problem …

I don’t thinks phpmyadmin redirect on port 8088. For me it’s Nginx, but
i don’t find a solution.

Le 09/06/2011 20:54, Maxim D. a écrit :

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs