July 31, 2017 10:33AM
Thanks for response,

> Setup log rotation depending on size of logs or daily rotation.
If I use log rotation would I still have access to all access data logs where I moved?

>Instead of randomly restarting – do a config check and only restart if the config is valid (should also validate the log location)
There is a scheduled script restarts server to close some program sockets once every week. Sorry I didn't explain correctly.

>You write in your initial post that if the access log exists, then you should use the external hard drive, however – have you considered that the file might exist but the device is in read-only?
I never had problem before on this servers external hdd In terms of device never become read only for last 3 years.

>You could also symlink /externalhdd/log/nginx to /var/log/nginx – in this case if the drive is mounted it would use the external drive, if it’s not mounted the file would get written to your SSD – but still won’t make up for a read only device in case that happens.
My friend is also suggested symblink, I will look on this suggestion

thank you.
Subject Author Posted

implementation of access.log with if condition

lifeisjustabout July 31, 2017 05:35AM

Re: implementation of access.log with if condition

Igor A. Ippolitov July 31, 2017 06:18AM

Re: implementation of access.log with if condition

lifeisjustabout July 31, 2017 07:08AM

Re: implementation of access.log with if condition

Lucas Rolff July 31, 2017 08:28AM

Re: implementation of access.log with if condition

lifeisjustabout July 31, 2017 10:33AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 317
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready