NginxConfig/nginx.conf
2016-05-23 20:17:49 +02:00

133 lines
2.5 KiB
Nginx Configuration File

user www-data;
worker_processes 4;
pid /run/nginx.pid;
worker_rlimit_nofile 102400;
events {
worker_connections 102400;
multi_accept on;
use epoll;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 70;
types_hash_max_size 4096;
server_tokens off;
# more_clear_headers 'Server';
# more_clear_headers 'X-Powered-By';
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection "1; mode=block;";
add_header X-Robts-Tag "none";
server_names_hash_max_size 10240;
server_names_hash_bucket_size 10240;
server_name_in_redirect off;
reset_timedout_connection on;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
connection_pool_size 10240;
client_header_buffer_size 2560k;
large_client_header_buffers 4 2560k;
client_max_body_size 1000M;
client_body_buffer_size 1280k;
request_pool_size 32k;
output_buffers 4 32k;
postpone_output 1460;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
#ssl_prefer_server_ciphers on;
include snippets/ssl.conf;
##
# Logging Settings
##
access_log off;
error_log /var/log/nginx/error.log crit;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 9;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types image/svg+xml text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Open file settings (speeds up serving of static content)
##
open_file_cache max=200000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
upstream php-handler {
server 127.0.0.1:9000;
}
server {
listen 80 default;
listen 443 ssl default;
include snippets/ssl-fallback.conf;
return 444;
}
# include /etc/nginx/conf.d/*.conf;
# include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}