Welcome! Log In Create A New Profile

Advanced

Changing port on which Nginx listens?

Gilles Ganault
July 16, 2010 04:46AM
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?

Thank you.


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Changing port on which Nginx listens?

Gilles Ganault July 16, 2010 04:46AM

Re: Changing port on which Nginx listens?

Jérôme Loyet July 16, 2010 06:40AM

Re: Changing port on which Nginx listens?

vesperto July 16, 2010 07:18AM

Re: Changing port on which Nginx listens?

Gilles Ganault July 16, 2010 07:50AM

Re: Changing port on which Nginx listens?

vesperto July 16, 2010 08:02AM

Re: Changing port on which Nginx listens?

Gilles Ganault July 16, 2010 08:06AM

Re: Changing port on which Nginx listens?

Jérôme Loyet July 16, 2010 08:12AM

Re: Changing port on which Nginx listens?

Gilles Ganault July 16, 2010 09:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 132
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready