# Nginx restarting/log rotation

**URL:** <https://www.ruby-forum.com/t/nginx-restarting-log-rotation/141284>\
**Category:** NGINX\
**Created:** [June 24, 2008, 10:25am UTC](https://www.ruby-forum.com/t/nginx-restarting-log-rotation/141284 "2008-06-24T10:25:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alanwatts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ad7895/32.png) [@alanwatts](https://www.ruby-forum.com/u/alanwatts)\
**Post date:** [June 24, 2008, 10:25am UTC](https://www.ruby-forum.com/t/nginx-restarting-log-rotation/141284/1 "2008-06-24T10:25:53Z")

</div>

Morning all.

what is the correct procedure for asking nginx to reload the  
configuration files?

and on that note, what is the procedure for restarting nginx to give me  
a chance to rotate the log files once a day? something similar to an  
“apachectl graceful”.

thanks  
a

---

<div class="post-metadata">

**Author:** ![alanwatts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ad7895/32.png) [@alanwatts](https://www.ruby-forum.com/u/alanwatts)\
**Post date:** [June 24, 2008, 10:38am UTC](https://www.ruby-forum.com/t/nginx-restarting-log-rotation/141284/2 "2008-06-24T10:38:47Z")

</div>

On Tue, Jun 24, 2008 at 4:19 PM, Alan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Morning all.
> 
> what is the correct procedure for asking nginx to reload the configuration  
> files?

kill -HUP `cat $PIDFILE`

> and on that note, what is the procedure for restarting nginx to give me a  
> chance to rotate the log files once a day? something similar to an  
> “apachectl graceful”.

hm… HM… … HM… 😛

-jf

–  
In the meantime, here is your PSA:  
“It’s so hard to write a graphics driver that open-sourcing it would not  
help.”  
– Andrew Fear, Software Product Manager, NVIDIA Corporation

> **[An Interview With Linus Torvalds: Linux and Git - Part 1 30 Years Of Linux](https://www.tag1consulting.com/blog/interview-linus-torvalds-linux-and-git)**
>
> Thirty years ago, Linus Torvalds was a 21 year old student at the University of Helsinki when he first released the Linux Kernel. His announcement started, “I’m doing a (free) operating system (just a hobby, won't be big and professional…)”. Three...

---

<div class="post-metadata">

**Author:** ![alanwatts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ad7895/32.png) [@alanwatts](https://www.ruby-forum.com/u/alanwatts)\
**Post date:** [June 24, 2008, 10:38am UTC](https://www.ruby-forum.com/t/nginx-restarting-log-rotation/141284/3 "2008-06-24T10:38:47Z")

</div>

On Tuesday 24 June 2008, Alan W. wrote:

> a  
> [http://wiki.codemongers.com/NginxCommandLine](http://wiki.codemongers.com/NginxCommandLine)

---

<div class="post-metadata">

**Author:** ![alanwatts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ad7895/32.png) [@alanwatts](https://www.ruby-forum.com/u/alanwatts)\
**Post date:** [June 24, 2008, 11:10am UTC](https://www.ruby-forum.com/t/nginx-restarting-log-rotation/141284/4 "2008-06-24T11:10:23Z")

</div>

Thank you one and all. appreciate it.

---

<div class="post-metadata">

**Author:** ![alanwatts](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ad7895/32.png) [@alanwatts](https://www.ruby-forum.com/u/alanwatts)\
**Post date:** [June 24, 2008, 10:48am UTC](https://www.ruby-forum.com/t/nginx-restarting-log-rotation/141284/5 "2008-06-24T10:48:10Z")

</div>

On Tue, Jun 24, 2008 at 09:19:16AM +0100, Alan W. wrote:

> what is the correct procedure for asking nginx to reload the  
> configuration files?

-HUP

> and on that note, what is the procedure for restarting nginx to give me  
> a chance to rotate the log files once a day? something similar to an  
> “apachectl graceful”.

Yes, but for instance log rotation you should use -USR1
