mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-02 15:33:32 +00:00
126 lines
2.6 KiB
Nginx Configuration File
126 lines
2.6 KiB
Nginx Configuration File
user root;
|
|
daemon off;
|
|
pcre_jit on;
|
|
worker_processes auto;
|
|
error_log stderr;
|
|
|
|
# Custom
|
|
include /data/nginx/custom/root.conf;
|
|
|
|
events {
|
|
use epoll;
|
|
|
|
# Custom
|
|
include /data/nginx/custom/events.conf;
|
|
}
|
|
|
|
http {
|
|
log_not_found off;
|
|
access_log /dev/null;
|
|
|
|
include mime.types;
|
|
default_type text/plain;
|
|
|
|
server_tokens build;
|
|
aio threads;
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
client_max_body_size 0;
|
|
|
|
gzip on;
|
|
gunzip on;
|
|
gzip_vary on;
|
|
gzip_types *;
|
|
gzip_proxied any;
|
|
gzip_comp_level 9;
|
|
|
|
resolver localhost;
|
|
fastcgi_index index.php;
|
|
index index.php index.html;
|
|
|
|
error_page 404 =307 $scheme://$host:$server_port;
|
|
error_page 497 =301 https://$host:$server_port$request_uri;
|
|
|
|
proxy_headers_hash_max_size 1024;
|
|
proxy_headers_hash_bucket_size 128;
|
|
|
|
# Default upstream scheme
|
|
map $host $forward_scheme {
|
|
default http;
|
|
}
|
|
|
|
# Websocket
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
upstream php7 {
|
|
server unix:/dev/php7.sock;
|
|
}
|
|
|
|
upstream php8 {
|
|
server unix:/dev/php8.sock;
|
|
}
|
|
|
|
upstream php81 {
|
|
server unix:/dev/php81.sock;
|
|
}
|
|
|
|
upstream php82 {
|
|
server unix:/dev/php82.sock;
|
|
}
|
|
|
|
# Fancy Index
|
|
fancyindex on;
|
|
fancyindex_localtime on;
|
|
fancyindex_show_path on;
|
|
fancyindex_exact_size off;
|
|
fancyindex_default_sort name;
|
|
fancyindex_show_dotfiles off;
|
|
fancyindex_hide_symlinks off;
|
|
fancyindex_hide_parent_dir off;
|
|
fancyindex_directories_first on;
|
|
fancyindex_time_format "%d-%m-%Y %T";
|
|
fancyindex_ignore "nft";
|
|
fancyindex_header "/nftd/header.html";
|
|
fancyindex_footer "/nftd/footer.html";
|
|
|
|
# Real IP Determination
|
|
real_ip_recursive on;
|
|
set_real_ip_from 10.0.0.0/8;
|
|
set_real_ip_from 172.16.0.0/12;
|
|
set_real_ip_from 192.168.0.0/16;
|
|
set_real_ip_from 169.254.0.0/16;
|
|
set_real_ip_from fc00::/7;
|
|
set_real_ip_from fec0::/10;
|
|
|
|
include fastcgi.conf;
|
|
fastcgi_param HTTP_PROXY "";
|
|
|
|
include conf.d/include/ip_ranges.conf;
|
|
|
|
include /data/nginx/default.conf;
|
|
include conf.d/*.conf;
|
|
|
|
# Custom
|
|
include /data/nginx/custom/http_top.conf;
|
|
|
|
# Files generated by NPM
|
|
include /data/nginx/proxy_host/*.conf;
|
|
include /data/nginx/redirection_host/*.conf;
|
|
include /data/nginx/dead_host/*.conf;
|
|
|
|
# Custom
|
|
include /data/nginx/custom/http.conf;
|
|
}
|
|
|
|
stream {
|
|
# Files generated by NPM
|
|
include /data/nginx/stream/*.conf;
|
|
|
|
# Custom
|
|
include /data/nginx/custom/stream.conf;
|
|
}
|