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

n my nginx conf file, I have :

listen 80;
server_name $hostname;

if I do netstat I see that it is listening on , 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.


Posted at Nginx Forum:,233398,233398#msg-233398


On Fri, Nov 30, 2012 at 5:01 AM, coral [email protected] wrote:

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


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs