mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-03 17:14:08 +02:00
87 lines
1.8 KiB
Nginx Configuration File
87 lines
1.8 KiB
Nginx Configuration File
user haze;
|
|
worker_processes 4;
|
|
pid /run/nginx.pid;
|
|
daemon off;
|
|
|
|
events {
|
|
worker_connections 768;
|
|
# multi_accept on;
|
|
}
|
|
|
|
http {
|
|
##
|
|
# Basic Settings
|
|
##
|
|
|
|
sendfile off;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
types_hash_max_size 2048;
|
|
# server_tokens off;
|
|
|
|
# server_names_hash_bucket_size 64;
|
|
# server_name_in_redirect off;
|
|
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
##
|
|
# Logging Settings
|
|
##
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
##
|
|
# Gzip Settings
|
|
##
|
|
|
|
gzip on;
|
|
gzip_disable "msie6";
|
|
|
|
|
|
# Don't send the nginx version number in error pages and Server header
|
|
server_tokens off;
|
|
|
|
upstream php-handler {
|
|
server unix:/var/run/php5-fpm.sock;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
|
|
# Path to the root of your installation
|
|
root /var/www/html;
|
|
|
|
client_max_body_size 10G;
|
|
# set max upload size
|
|
fastcgi_buffers 64 4K;
|
|
|
|
index index.php;
|
|
|
|
location = /robots.txt {
|
|
allow all;
|
|
log_not_found off;
|
|
access_log off;
|
|
}
|
|
|
|
include nginx-app.conf;
|
|
|
|
location ~ \.php(?:$|/) {
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
fastcgi_pass php-handler;
|
|
fastcgi_read_timeout 600;
|
|
}
|
|
|
|
## Optional: set long EXPIRES header on static assets
|
|
location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
|
|
expires 30d;
|
|
## Optional: Don't log access to assets
|
|
access_log off;
|
|
}
|
|
}
|
|
}
|