2022-01-09 10:16:11 -05:00
|
|
|
## Version 2022/01/09 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx.conf
|
2020-08-03 11:00:14 -04:00
|
|
|
|
|
|
|
user abc;
|
2021-04-27 10:30:41 -04:00
|
|
|
|
|
|
|
# Set number of worker processes automatically based on number of CPU cores.
|
2021-05-14 17:07:21 -04:00
|
|
|
include /config/nginx/worker_processes.conf;
|
2021-04-27 10:30:41 -04:00
|
|
|
|
|
|
|
# Enables the use of JIT for regular expressions to speed-up their processing.
|
|
|
|
pcre_jit on;
|
|
|
|
|
|
|
|
# Configures default error logger.
|
2021-04-27 15:23:35 -04:00
|
|
|
error_log /config/log/nginx/error.log;
|
2021-04-27 10:30:41 -04:00
|
|
|
|
|
|
|
# Includes files with directives to load dynamic modules.
|
2020-08-03 11:00:14 -04:00
|
|
|
include /etc/nginx/modules/*.conf;
|
|
|
|
|
|
|
|
events {
|
2021-04-27 15:32:41 -04:00
|
|
|
# The maximum number of simultaneous connections that can be opened by
|
|
|
|
# a worker process.
|
|
|
|
worker_connections 1024;
|
|
|
|
# multi_accept on;
|
2020-08-03 11:00:14 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
http {
|
2021-04-27 15:32:41 -04:00
|
|
|
# Includes mapping of file name extensions to MIME types of responses
|
|
|
|
# and defines the default type.
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
|
|
|
# Name servers used to resolve names of upstream servers into addresses.
|
|
|
|
# It's also needed when using tcpsocket and udpsocket in Lua modules.
|
|
|
|
#resolver 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001;
|
2021-05-14 17:07:21 -04:00
|
|
|
include /config/nginx/resolver.conf;
|
2021-04-27 15:32:41 -04:00
|
|
|
|
|
|
|
# Don't tell nginx version to the clients. Default is 'on'.
|
|
|
|
server_tokens off;
|
|
|
|
|
|
|
|
# Specifies the maximum accepted body size of a client request, as
|
|
|
|
# indicated by the request header Content-Length. If the stated content
|
|
|
|
# length is greater than this size, then the client receives the HTTP
|
|
|
|
# error code 413. Set to 0 to disable. Default is '1m'.
|
|
|
|
client_max_body_size 0;
|
|
|
|
|
|
|
|
# Sendfile copies data between one FD and other from within the kernel,
|
|
|
|
# which is more efficient than read() + write(). Default is off.
|
|
|
|
sendfile on;
|
|
|
|
|
|
|
|
# Causes nginx to attempt to send its HTTP response head in one packet,
|
|
|
|
# instead of using partial frames. Default is 'off'.
|
|
|
|
tcp_nopush on;
|
|
|
|
|
|
|
|
# Helper variable for proxying websockets.
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
|
|
default upgrade;
|
|
|
|
'' close;
|
|
|
|
}
|
|
|
|
|
2022-01-09 10:16:11 -05:00
|
|
|
# Saves unauthorized log messages to a separate log file
|
|
|
|
map $status $unauthorized {
|
|
|
|
default 0;
|
|
|
|
~^401 1;
|
|
|
|
}
|
|
|
|
access_log /config/log/nginx/unauthorized.log combined if=$unauthorized;
|
|
|
|
|
2021-04-27 15:32:41 -04:00
|
|
|
# Sets the path, format, and configuration for a buffered log write.
|
|
|
|
access_log /config/log/nginx/access.log;
|
|
|
|
|
|
|
|
# Includes virtual hosts configs.
|
|
|
|
#include /etc/nginx/http.d/*.conf;
|
|
|
|
|
|
|
|
# WARNING: Don't use this directory for virtual hosts anymore.
|
|
|
|
# This include will be moved to the root context in Alpine 3.14.
|
|
|
|
#include /etc/nginx/conf.d/*.conf;
|
|
|
|
|
|
|
|
|
|
|
|
##
|
|
|
|
# Basic Settings
|
|
|
|
##
|
|
|
|
|
|
|
|
client_body_buffer_size 128k;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
large_client_header_buffers 4 16k;
|
|
|
|
send_timeout 5m;
|
|
|
|
tcp_nodelay on;
|
|
|
|
types_hash_max_size 2048;
|
|
|
|
variables_hash_max_size 2048;
|
|
|
|
# server_names_hash_bucket_size 64;
|
|
|
|
# server_name_in_redirect off;
|
|
|
|
|
|
|
|
##
|
|
|
|
# Gzip Settings
|
|
|
|
##
|
|
|
|
|
|
|
|
gzip on;
|
|
|
|
gzip_disable "msie6";
|
|
|
|
# gzip_vary on;
|
|
|
|
# gzip_proxied any;
|
|
|
|
# gzip_comp_level 6;
|
|
|
|
# gzip_buffers 16 8k;
|
|
|
|
# gzip_http_version 1.1;
|
|
|
|
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
|
|
|
|
##
|
|
|
|
# nginx-naxsi config
|
|
|
|
##
|
|
|
|
# Uncomment it if you installed nginx-naxsi
|
|
|
|
##
|
|
|
|
|
|
|
|
#include /etc/nginx/naxsi_core.rules;
|
|
|
|
|
|
|
|
##
|
|
|
|
# nginx-passenger config
|
|
|
|
##
|
|
|
|
# Uncomment it if you installed nginx-passenger
|
|
|
|
##
|
|
|
|
|
|
|
|
#passenger_root /usr;
|
|
|
|
#passenger_ruby /usr/bin/ruby;
|
|
|
|
|
|
|
|
##
|
|
|
|
# Virtual Host Configs
|
|
|
|
##
|
|
|
|
include /config/nginx/site-confs/*;
|
|
|
|
#Removed lua. Do not remove this comment
|
2020-08-03 11:00:14 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#mail {
|
2021-04-27 15:32:41 -04:00
|
|
|
# # See sample authentication script at:
|
|
|
|
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
|
2020-08-03 11:00:14 -04:00
|
|
|
#
|
2021-04-27 15:32:41 -04:00
|
|
|
# # auth_http localhost/auth.php;
|
|
|
|
# # pop3_capabilities "TOP" "USER";
|
|
|
|
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
|
2020-08-03 11:00:14 -04:00
|
|
|
#
|
2021-04-27 15:32:41 -04:00
|
|
|
# server {
|
|
|
|
# listen localhost:110;
|
|
|
|
# protocol pop3;
|
|
|
|
# proxy on;
|
|
|
|
# }
|
2020-08-03 11:00:14 -04:00
|
|
|
#
|
2021-04-27 15:32:41 -04:00
|
|
|
# server {
|
|
|
|
# listen localhost:143;
|
|
|
|
# protocol imap;
|
|
|
|
# proxy on;
|
|
|
|
# }
|
2020-08-03 11:00:14 -04:00
|
|
|
#}
|
2021-04-27 15:23:35 -04:00
|
|
|
|
2020-08-03 11:00:14 -04:00
|
|
|
daemon off;
|
2021-04-27 10:30:41 -04:00
|
|
|
pid /run/nginx.pid;
|