Correct message after restarting nginx?

hi

I used two different tutorials to install nginx. LEMP and Redmine one
from Linode library.

I made the LEMP one work and after restarting nginx I used get message
with something about testing and that new config was or wasn’t loaded
successfully.

Now I get

[email protected]:~# /etc/init.d/nginx reload
Reloading nginx configuration: nginx.

It seems to me that init script is exactly the same like was before.

any idea how I can get the old more detailed message after restarting
nginx?

Thank you
R.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,130498,130498#msg-130498

On Wed, Sep 15, 2010 at 8:43 AM, cimenta [email protected] wrote:

Now I get

[email protected]:~# /etc/init.d/nginx reload
> Reloading nginx configuration: nginx.

probably the messages have been suppressed by the init.d script.

any idea how I can get the old more detailed message after restarting
nginx?

assuming your config file is at default location:

nginx -s reload

or else additionally specify the config file location by using -c
/path/to/nginx.conf


O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

edogawaconan Wrote:

init.d script.
but I want to know if the new configuration was loaded or not. Like it
was happening before.

I installed nginx using

./passenger-install-nginx-module

assuming your config file is at default location:

nginx -s reload

gets no output

[email protected]:/opt/nginx# sbin/nginx -s reload
[email protected]:/opt/nginx#

or else additionally specify the config file
location by using -c
/path/to/nginx.conf

gets

[email protected]:/opt/nginx# sbin/nginx -c conf/nginx.conf
[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()

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,130498,130505#msg-130505

On Wed, Sep 15, 2010 at 9:17 AM, cimenta [email protected] wrote:

gets no output

[email protected]:/opt/nginx# sbin/nginx -s reload
> [email protected]:/opt/nginx#

sorry, I got them wrong. The one you wanted is probaby -t.

[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()

[/code]

overall, it goes like this

/opt/nginx# sbin/nginx -c conf/nginx.conf -t

which then you can either

/opt/nginx# sbin/nginx -c conf/nginx.conf -s reload

or just

/etc/init.d/nginx reload


O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

Hello!

On Tue, Sep 14, 2010 at 09:43:03PM -0400, cimenta wrote:

[email protected]:~# /etc/init.d/nginx reload
> Reloading nginx configuration: nginx.

It seems to me that init script is exactly the same like was before.

any idea how I can get the old more detailed message after restarting
nginx?

nginx doesn’t print any “detailed messages” on reload. Actually,
reload is just sending HUP signal to nginx master process, so
nginx just has no chances to say anything as it’s not connected to
teminal. Anything it has to say (if something goes wrong) will be
written to error_log.

Probably your previous init script either used configtest (nginx
-t) before actual reload. Feel free to modify your new init
script to do the same.

Maxim D.

Maxim D. Wrote:

nginx mailing list
[email protected]
http://nginx.org/mailman/listinfo/nginx

Hi Maxim

although I cannot see the ‘nginx -t’ command in previous script it does
the trick.

Thank you for your help.

R.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,130498,130513#msg-130513