Port forwarding problem

Igor Sysoev igor at sysoev.ru
Tue Jul 26 12:12:02 UTC 2011


On Tue, Jul 26, 2011 at 06:35:23AM -0400, Quincy wrote:
> Hi
> 
> I have two machines. One is server with nginx and the other is NAT.
> On server I've got mediawiki on port 2222. I forwared port 55555 on my
> nat to server:2222. I have one big problem. When I try to open
> NAT_IP:55555 in my browser it redirects me to http://:2222.  What's
> wrong with my config?
> 
> Here is my virtualhost config file:
>   1 server {
>   2   listen 2222;
>   3   server_name MYNAMEl;
>   4   server_name_in_redirect off;
>   5   port_in_redirect off;
>   6 
>   7   root XXXX;
>   8 
>   9   location / {
>  10     index index.php;
>  11     error_page 404 = @mediawiki;
>  12   }
>  13 
>  14   location @mediawiki {
>  15     rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
>  16   }
> ....
>  44 }

I believe this redirect is sent by mediawiki.
Could you show debug log of the request
http://nginx.org/en/docs/debugging_log.html
?


-- 
Igor Sysoev



More information about the nginx mailing list