43 lines
970 B
Nginx Configuration File
43 lines
970 B
Nginx Configuration File
load_module "/usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so";
|
|
worker_processes auto;
|
|
user nginx nginx;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
types_hash_bucket_size 128; # Default: 64
|
|
types_hash_max_size 1024; # Default: 1024
|
|
server_names_hash_bucket_size 128;
|
|
|
|
# Performance optimisation
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
|
|
# Correct Content-Type header
|
|
charset utf-8;
|
|
default_type text/plain;
|
|
include inc/types.conf;
|
|
|
|
# Serve file.gz instead of file if available
|
|
gzip_static on;
|
|
|
|
# Logging
|
|
log_format niver '|$time_local| [$remote_addr]@$server_name {$ssl_protocol $ssl_cipher} "$request" $status $body_bytes_sent "$http_user_agent"';
|
|
access_log /var/log/nginx/access.log niver;
|
|
error_log /var/log/nginx/error.log notice;
|
|
|
|
# Possible security threats
|
|
server_tokens off;
|
|
etag off;
|
|
autoindex off;
|
|
gzip off;
|
|
|
|
# Include other configuration
|
|
include sites/*.conf;
|
|
include ht/*.conf;
|
|
include default-server.conf;
|
|
include http.conf;
|
|
}
|