summaryrefslogtreecommitdiff
path: root/images/router/nginx/nginx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'images/router/nginx/nginx.conf')
-rw-r--r--images/router/nginx/nginx.conf67
1 files changed, 67 insertions, 0 deletions
diff --git a/images/router/nginx/nginx.conf b/images/router/nginx/nginx.conf
new file mode 100644
index 0000000..cb9b8c8
--- /dev/null
+++ b/images/router/nginx/nginx.conf
@@ -0,0 +1,67 @@
+worker_processes auto;
+pid /run/nginx.pid;
+
+include modules/stream.conf;
+
+events {
+ worker_connections 1024;
+}
+
+http {
+ sendfile on;
+ tcp_nopush on;
+ tcp_nodelay on;
+ keepalive_timeout 65;
+ types_hash_max_size 2048;
+
+ #include /etc/nginx/mime.types;
+ default_type application/octet-stream;
+
+ include snippets/ssl_ciphers;
+ ssl_session_cache shared:SSL:25m;
+ ssl_session_timeout 10m;
+
+ # Gzip
+ 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/javascript text/xml application/xml application/xml+rss text/javasc$
+
+ # Logging
+ access_log /var/log/nginx/access.log;
+ error_log /var/log/nginx/error.log;
+
+ server {
+ listen 80 default_server;
+ listen [::]:80 default_server;
+
+ server_name _;
+ return 301 https://$host$request_uri;
+ }
+
+ server {
+ listen 443 ssl default_server;
+ listen [::]:443 ssl default_server;
+
+ server_name _;
+ include snippets/ssl_http;
+ return 503;
+ }
+
+ include /etc/nginx/conf.d/*.conf;
+ include /etc/nginx/http/*;
+}
+
+stream {
+ include snippets/ssl_ciphers;
+
+ ssl_session_cache shared:TCP:25m;
+ ssl_session_timeout 10m;
+
+ include /etc/nginx/stream/*;
+}