# Correct message after restarting nginx?

**URL:** <https://www.ruby-forum.com/t/correct-message-after-restarting-nginx/194992>\
**Category:** NGINX\
**Created:** [September 15, 2010, 3:43am UTC](https://www.ruby-forum.com/t/correct-message-after-restarting-nginx/194992 "2010-09-15T03:43:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cimenta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@cimenta](https://www.ruby-forum.com/u/cimenta)\
**Post date:** [September 15, 2010, 3:43am UTC](https://www.ruby-forum.com/t/correct-message-after-restarting-nginx/194992/1 "2010-09-15T03:43:34Z")

</div>

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

```auto
root@server:~# /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:

> **[correct message after restarting nginx?](https://forum.nginx.org/read.php?2,130498,130498#msg-130498)**
>
> 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....

---

<div class="post-metadata">

**Author:** ![cimenta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@cimenta](https://www.ruby-forum.com/u/cimenta)\
**Post date:** [September 15, 2010, 3:51am UTC](https://www.ruby-forum.com/t/correct-message-after-restarting-nginx/194992/2 "2010-09-15T03:51:11Z")

</div>

On Wed, Sep 15, 2010 at 8:43 AM, cimenta [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Now I get
> 
> ```auto
> root@server:~# /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](http://www.asciiribbon.org)

---

<div class="post-metadata">

**Author:** ![cimenta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@cimenta](https://www.ruby-forum.com/u/cimenta)\
**Post date:** [September 15, 2010, 4:18am UTC](https://www.ruby-forum.com/t/correct-message-after-restarting-nginx/194992/3 "2010-09-15T04:18:41Z")

</div>

## 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

```auto
./passenger-install-nginx-module
```

> assuming your config file is at default location:
> 
> # nginx -s reload

gets no output

```auto
root@server:/opt/nginx# sbin/nginx -s reload
root@server:/opt/nginx#
```

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

gets

```auto
root@server:/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](http://forum.nginx.org/read.php?2,130498,130505#msg-130505)

---

<div class="post-metadata">

**Author:** ![cimenta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@cimenta](https://www.ruby-forum.com/u/cimenta)\
**Post date:** [September 15, 2010, 5:01am UTC](https://www.ruby-forum.com/t/correct-message-after-restarting-nginx/194992/4 "2010-09-15T05:01:24Z")

</div>

On Wed, Sep 15, 2010 at 9:17 AM, cimenta [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> gets no output
> 
> ```auto
> root@server:/opt/nginx# sbin/nginx -s reload
> root@server:/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](http://www.asciiribbon.org)

---

<div class="post-metadata">

**Author:** ![cimenta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@cimenta](https://www.ruby-forum.com/u/cimenta)\
**Post date:** [September 15, 2010, 4:33am UTC](https://www.ruby-forum.com/t/correct-message-after-restarting-nginx/194992/5 "2010-09-15T04:33:19Z")

</div>

Hello!

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

> ```auto
> root@server:~# /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.

---

<div class="post-metadata">

**Author:** ![cimenta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e0b2c6/32.png) [@cimenta](https://www.ruby-forum.com/u/cimenta)\
**Post date:** [September 15, 2010, 6:21am UTC](https://www.ruby-forum.com/t/correct-message-after-restarting-nginx/194992/6 "2010-09-15T06:21:35Z")

</div>

## Maxim D. Wrote:

> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](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](http://forum.nginx.org/read.php?2,130498,130513#msg-130513)
