diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf index 30a1e51..819d1c9 100644 --- a/etc/nginx/nginx.conf +++ b/etc/nginx/nginx.conf @@ -66,7 +66,7 @@ http { gzip_vary on; gzip_proxied any; - gzip_comp_level 9; + gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml; diff --git a/etc/nginx/sites-enabled/default b/etc/nginx/sites-enabled/default index e1ad0d9..59ed2c0 100644 --- a/etc/nginx/sites-enabled/default +++ b/etc/nginx/sites-enabled/default @@ -2,13 +2,13 @@ server { listen 80 default_server; root /var/www/html; index index.php; - server_name dhosting4okcs22v.onion; + server_name dhosting4okcs22v.onion *.dhosting4okcs22v.onion; location / { try_files $uri $uri/ =404; - } - location ~ \.php$ { - include snippets/fastcgi-php.conf; - fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; + } } location /squirrelmail { location ~ \.php$ { @@ -33,4 +33,8 @@ server { location /externals/jush/ { root /usr/share/adminer; } + location /nginx/ { + root /var/log/; + internal; + } } diff --git a/var/www/html/log.php b/var/www/html/log.php index 067db0d..f8b2f95 100644 --- a/var/www/html/log.php +++ b/var/www/html/log.php @@ -23,6 +23,5 @@ header('Pragma: no-cache'); header('Cache-Control: no-cache, no-store, must-revalidate, max-age=0'); header('Expires: 0'); if(file_exists("/var/log/nginx/{$type}_$user[onion].onion.log$old")){ - readfile("/var/log/nginx/{$type}_$user[onion].onion.log$old"); + header("X-Accel-Redirect: /nginx/{$type}_$user[onion].onion.log$old"); } -?>