Welcome! Log In Create A New Profile

Advanced

Re: nginx listen to $hostname doesn't work, is it supported?

Joshua Zhu
November 30, 2012 12:34AM
Hi,

On Fri, Nov 30, 2012 at 5:01 AM, coral <nginx-forum@nginx.us> wrote:

> n my nginx conf file, I have :
>
> listen 80;
> server_name $hostname;
>
> if I do netstat I see that it is listening on 0.0.0.0:80 , is there any
> workaround in nginx.conf , to make it listen to $hostname:80 ? where
> $hostname is coming from system ?
>
> I tried multiple combinations with no success so far.
>

Why not just use 'localhost'? For example:
listen localhost:80;

Regards,

--
Joshua Zhu
Senior Software Engineer
Server Platforms Team at Taobao
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx listen to $hostname doesn't work, is it supported?

coral November 29, 2012 04:01PM

Re: nginx listen to $hostname doesn't work, is it supported?

Joshua Zhu November 30, 2012 12:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 154
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