Welcome! Log In Create A New Profile

Advanced

include problem in config

October 05, 2010 10:04AM
Hi!

im migrating my nginx farm from 0.6.x -> 0.7.x (ubuntu 8.04->10.x)

with 0.6 version of nginx i used a simple "include /etc/nginx/ports.conf;" in nginx.conf in a "virtual" server directive to include a

"listen 192.168.64.xx;"

directive from external file, because my nginx.conf files are syncronized between several servers,
and my listen adresses are different (of course) for every machine

with 0.7.65 i cannot start the nginx server, because the process ignores my include statement, and trying to bind on all interfaces

Starting nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
configuration file /etc/nginx/nginx.conf test is successful
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: still could not bind()

my sample server definition is here
server {
include /etc/nginx/ports.conf;
server_name st04.myhost.org;

root /var/www/myhost.org/;
}

my ports.conf
listen 192.168.64.xx; (changes with every machine and is not synced during changes)

is there another way to use common config files between several machines, and also use different ip addresses for listening in a farm?
Subject Author Posted

include problem in config

friizer October 05, 2010 10:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready