Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##########################################
- letsencrypt/nginx/nginx.conf
- ##########################################
- user abc;
- worker_processes 4;
- pid /run/nginx.pid;
- events {
- worker_connections 768;
- }
- http {
- ##
- # Basic Settings
- ##
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- keepalive_timeout 65;
- types_hash_max_size 2048;
- client_max_body_size 0;
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- ##
- # Logging Settings
- ##
- access_log /config/log/nginx/access.log;
- error_log /config/log/nginx/error.log;
- ##
- # Gzip Settings
- ##
- gzip on;
- gzip_disable "msie6";
- ##
- # Virtual Host Configs
- ##
- include /etc/nginx/conf.d/*.conf;
- include /config/nginx/site-confs/*;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
- ssl_prefer_server_ciphers on;
- ssl_session_cache shared:SSL:10m;
- add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
- add_header X-Frame-Options SAMEORIGIN;
- add_header X-Content-Type-Options nosniff;
- add_header X-XSS-Protection "1; mode=block";
- add_header X-Robots-Tag none;
- ssl_stapling on; # Requires nginx >= 1.3.7
- ssl_stapling_verify on; # Requires nginx => 1.3.7
- }
- daemon off;
- ##########################################
- letsencrypt/nginx/proxy.conf
- ##########################################
- client_max_body_size 10g;
- client_body_buffer_size 128k;
- #Timeout if the real server is dead
- proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
- # Advanced Proxy Config
- send_timeout 5m;
- proxy_read_timeout 240;
- proxy_send_timeout 240;
- proxy_connect_timeout 240;
- # Basic Proxy Config
- proxy_set_header Host $host:$server_port;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto https;
- proxy_redirect http:// $scheme://;
- proxy_http_version 1.1;
- proxy_set_header Connection "";
- proxy_cache_bypass $cookie_session;
- proxy_no_cache $cookie_session;
- proxy_buffers 32 4k;
- ##########################################
- letsencrypt/nginx/site-confs/default
- ##########################################
- upstream backend {
- server 192.168.1.207:19999;
- keepalive 64;
- }
- ## Radarr
- server {
- server_name radarr.subdomain.duckdns.org;
- include /config/nginx/common;
- location / {
- auth_basic "Restricted";
- auth_basic_user_file /config/nginx/.htpasswd;
- include /config/nginx/proxy.conf;
- proxy_pass http://192.168.1.207:7878;
- }
- }
- ## Sonarr
- server {
- server_name sonarr.subdomain.duckdns.org;
- include /config/nginx/common;
- location / {
- auth_basic "Restricted";
- auth_basic_user_file /config/nginx/.htpasswd;
- include /config/nginx/proxy.conf;
- proxy_pass http://192.168.1.207:8989;
- }
- }
- ## Ombi
- server {
- server_name ombi.subdomain.duckdns.org;
- include /config/nginx/common;
- location / {
- proxy_pass http://192.168.1.207:3579;
- }
- }
- ## Torrents
- server {
- server_name torrents.subdomain.duckdns.org;
- include /config/nginx/common;
- location / {
- auth_basic "Restricted";
- auth_basic_user_file /config/nginx/.htpasswd;
- include /config/nginx/proxy.conf;
- proxy_pass http://192.168.1.207:9091;
- }
- }
- ## Gitea
- server {
- server_name gitea.subdomain.duckdns.org;
- include /config/nginx/common;
- location / {
- proxy_pass http://192.168.1.207:3000;
- }
- }
- ## unRAID
- server {
- listen 443 ssl;
- listen 80;
- root /config/www;
- index index.html index.htm index.php;
- server_name subdomain.duckdns.org;
- ssl_certificate /config/keys/letsencrypt/fullchain.pem;
- ssl_certificate_key /config/keys/letsencrypt/privkey.pem;
- ssl_dhparam /config/nginx/dhparams.pem;
- ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
- ssl_prefer_server_ciphers on;
- client_max_body_size 0;
- location / {
- include /config/nginx/proxy.conf;
- proxy_pass http://192.168.1.207;
- }
- location ~ /netdata/(?<ndpath>.*) {
- auth_basic "Restricted";
- auth_basic_user_file /config/nginx/.htpasswd;
- proxy_set_header X-Forwarded-Host $host;
- proxy_set_header X-Forwarded-Server $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_pass http://backend/$ndpath$is_args$args;
- proxy_http_version 1.1;
- proxy_pass_request_headers on;
- proxy_set_header Connection "keep-alive";
- proxy_store off;
- }
- }
- ##########################################
- nextcloud/nginx/nginx.conf
- ##########################################
- user abc;
- worker_processes 4;
- pid /run/nginx.pid;
- events {
- worker_connections 768;
- }
- http {
- ##
- # Basic Settings
- ##
- sendfile on;
- tcp_nopush on;
- tcp_nodelay on;
- keepalive_timeout 65;
- types_hash_max_size 2048;
- client_max_body_size 0;
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- ##
- # Logging Settings
- ##
- access_log /config/log/nginx/access.log;
- error_log /config/log/nginx/error.log;
- ##
- # Gzip Settings
- ##
- gzip on;
- gzip_disable "msie6";
- ##
- # Virtual Host Configs
- ##
- include /etc/nginx/conf.d/*.conf;
- include /config/nginx/site-confs/*;
- }
- daemon off;
- ##########################################
- nextcloud/nginx/site-confs/default
- ##########################################
- upstream php-handler {
- server 127.0.0.1:9000;
- # server unix:/var/run/php/php7.0-fpm.sock;
- }
- server {
- listen 80;
- server_name _;
- # enforce https
- return 301 https://$server_name$request_uri;
- }
- server {
- listen 443 ssl;
- server_name _;
- ssl_certificate /config/keys/cert.crt;
- ssl_certificate_key /config/keys/cert.key;
- # Add headers to serve security related headers
- add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
- add_header X-Content-Type-Options nosniff;
- # add_header X-Frame-Options "SAMEORIGIN";
- add_header X-XSS-Protection "1; mode=block";
- add_header X-Robots-Tag none;
- add_header X-Download-Options noopen;
- add_header X-Permitted-Cross-Domain-Policies none;
- # Path to the root of your installation
- root /config/www/nextcloud/;
- # set max upload size
- client_max_body_size 10G;
- fastcgi_buffers 64 4K;
- # Disable gzip to avoid the removal of the ETag header
- gzip off;
- index index.php;
- error_page 403 /core/templates/403.php;
- error_page 404 /core/templates/404.php;
- rewrite ^/.well-known/carddav /remote.php/dav/ permanent;
- rewrite ^/.well-known/caldav /remote.php/dav/ permanent;
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- location ~ ^/(build|tests|config|lib|3rdparty|templates|data)/ {
- deny all;
- }
- location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
- deny all;
- }
- location / {
- rewrite ^/remote/(.*) /remote.php last;
- rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
- try_files $uri $uri/ =404;
- }
- location ~ \.php(?:$|/) {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- include /etc/nginx/fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param HTTPS on;
- fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice
- fastcgi_pass php-handler;
- fastcgi_intercept_errors on;
- }
- # Adding the cache control header for js and css files
- # Make sure it is BELOW the location ~ \.php(?:$|/) { block
- location ~* \.(?:css|js)$ {
- add_header Cache-Control "public, max-age=7200";
- # Add headers to serve security related headers
- add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
- add_header X-Content-Type-Options nosniff;
- add_header X-Frame-Options "SAMEORIGIN";
- add_header X-XSS-Protection "1; mode=block";
- add_header X-Robots-Tag none;
- add_header X-Download-Options noopen;
- add_header X-Permitted-Cross-Domain-Policies none;
- # Optional: Don't log access to assets
- access_log off;
- }
- # Optional: Don't log access to other assets
- location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|swf)$ {
- access_log off;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement