Re: implementation of access.log with if condition

2017-07-31 Thread lifeisjustabout
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

Re: implementation of access.log with if condition

2017-07-31 Thread Lucas Rolff
> I don't want to locate logs on ssd main (hardrive /var/log/nginx/) which is > obviously smaller hard disk than my external sata hdd (/externalhdd/log/nginx/ Setup log rotation depending on size of logs or daily rotation. > I still want my website to operate after restart because every week ser

Re: implementation of access.log with if condition

2017-07-31 Thread lifeisjustabout
Thanks for the response. The reason why I want to implement this is because I have dedicated server and thanks to nginx everything is work perfectly so I don't need to check server everyday. I don't want to locate logs on ssd main (hardrive /var/log/nginx/) which is obviously smaller hard disk than

Re: implementation of access.log with if condition

2017-07-31 Thread Igor A. Ippolitov
Hello, As far as I know, it's impossible using Nginx. But you can archive the same result using only 'access_log' statement into 'permanent' location. Just mount your external drive 'nginx' directory over /var/log/nginx like: mount -o bind /externalhdd/log/nginx/ /var/log/nginx/ If it is u

implementation of access.log with if condition

2017-07-31 Thread lifeisjustabout
Hi I would like to implement if condition on access and error log. Prior to nginx restart I want nginx to look for first log path location eg. /externalhdd/log/nginx/example.com_access.log, if log doesn't exist use second path which is /var/log/nginx/example.com_access.log I have given like my exa