Changing port on which Nginx listens?

Jérôme Loyet jerome at loyet.net
Fri Jul 16 16:08:50 MSD 2010


2010/7/16 Gilles Ganault <gilles.ganault at free.fr>:
> On Fri, 16 Jul 2010 13:45:17 +0200, Gilles Ganault
> <gilles.ganault at free.fr> wrote:
>>I'll keep investigating and report back.
>
> Weird :-/
>
> With http://192.168.0.8:8787, it looks like the browser tries
> unsuccesfully to connect to 8787, and is then redirected to 80...
> which fails since the server is not listening on that port:
>
> ===========
> 192.168.0.1 - - [16/Jul/2010:13:54:05 +0200] "GET / HTTP/1.1" 301 335
> "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.9
> (KHTML, like Gecko) Iron/4.0.280.0 Chrome/4.0.280.0 Safari/532.9"
>
> 192.168.0.1 - - [16/Jul/2010:13:54:10 +0200] "GET / HTTP/1.1" 301 335
> "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.9
> (KHTML, like Gecko) Iron/4.0.280.0 Chrome/4.0.280.0 Safari/532.9"
> ===========
>
> Same issue with Chrome, Firefox, and Opera. Rebooted Ubuntu, no
> change. Tried from a tiny Linux appliance, same issue:
>
>> wget http://192.168.0.8:8787/
> Connecting to 192.168.0.8:8787 (192.168.0.8:8787)
> Connecting to 192.168.0.8 (192.168.0.8:80)
> wget: can't connect to remote host (192.168.0.8): Connection refused
>
> Any idea what could be causing PHP or the web server to redirect to
> 80?

what's the content of index.php ? try by simply set <?php phpinfo(); ?>

>
> Thank you.



More information about the nginx mailing list