Buffer access log writes to reduce IO

This commit is contained in:
Daniel Winzen
2018-05-13 09:04:12 +02:00
parent 1a9ee646c6
commit dda49153b3
2 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ http {
# Logging Settings # Logging Settings
## ##
log_format custom '$host: 0.0.0.0 - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent"'; log_format custom '$host: 0.0.0.0 - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent"';
access_log /var/log/nginx/access.log custom; access_log /var/log/nginx/access.log custom buffer=32k flush=1m;
error_log /var/log/nginx/error.log notice; error_log /var/log/nginx/error.log notice;
log_not_found off; log_not_found off;

View File

@ -51,8 +51,8 @@ $nginx="server {
listen unix:/var/run/nginx/$onion; listen unix:/var/run/nginx/$onion;
root /home/$onion.onion/www; root /home/$onion.onion/www;
server_name $onion.onion *.$onion.onion; server_name $onion.onion *.$onion.onion;
access_log /var/log/nginx/access_$onion.onion.log custom; access_log /var/log/nginx/access_$onion.onion.log custom buffer=32k flush=1m;
access_log /home/$onion.onion/logs/access.log custom; access_log /home/$onion.onion/logs/access.log custom buffer=32k flush=1m;
error_log /var/log/nginx/error_$onion.onion.log notice; error_log /var/log/nginx/error_$onion.onion.log notice;
error_log /home/$onion.onion/logs/error.log notice; error_log /home/$onion.onion/logs/error.log notice;
disable_symlinks on from=/home/$onion.onion/www; disable_symlinks on from=/home/$onion.onion/www;