Changing port on which Nginx listens?
Jérôme Loyet
jerome at loyet.net
Fri Jul 16 14:37:20 MSD 2010
2010/7/16 Gilles Ganault <gilles.ganault at free.fr>:
> Hello
>
> I wanted to move from 80 to 8787, and now, Nginx redirects to 80 and
> replies with 301 :-/
>
> # /etc/init.d/nginx stop
>
> # vi /etc/nginx/sites-available/default
> server {
> listen 8787 default;
>
> # /etc/init.d/nginx start
>
> # netstat -nat
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address Foreign Address State
> tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN
> tcp 0 0 0.0.0.0:8787 0.0.0.0:* LISTEN
>
> >From remote Windows host: http://192.168.0.8:8787/
> 192.168.0.1 - - [16/Jul/2010:03:55:53 +0200] "GET / HTTP/1.1" 301 5
> "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4)
> Gecko/20100611 Firefox/3.6.4"
>
> Any idea how to configure Nginx accordingly?
are you sure that nginx returns 301 ? It's certainely the PHP part
which returns 301.
>
> Thank you.
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
More information about the nginx
mailing list