Last active
June 26, 2020 20:25
-
-
Save LindseyB/3d3dc82450f97ba3cc73b8a9fed4111b to your computer and use it in GitHub Desktop.
nginx conf for windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
access_log logs/access.log main; | |
sendfile on; | |
#tcp_nopush on; | |
#keepalive_timeout 0; | |
keepalive_timeout 65; | |
#gzip on; | |
server { | |
listen 80; | |
server_name localhost; | |
auth_basic on; | |
auth_basic_user_file C:/nginx-1.13.5/nginx-1.13.5/conf/htpassword; | |
location /sonarr { | |
proxy_pass http://127.0.0.1:8989; | |
proxy_set_header Host $host; | |
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 $scheme; | |
proxy_redirect off; | |
} | |
location /radarr { | |
proxy_pass http://127.0.0.1:7878; | |
proxy_set_header Host $host; | |
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 $scheme; | |
proxy_redirect off; | |
} | |
location /sabnzbd { | |
proxy_pass http://127.0.0.1:8080; | |
proxy_set_header Host $host; | |
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 $scheme; | |
proxy_redirect off; | |
} | |
location /web { | |
proxy_pass http://127.0.0.1:32400; | |
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 $scheme; | |
proxy_set_header Host $server_addr; | |
proxy_set_header Referer $server_addr; | |
proxy_set_header Origin $server_addr; | |
gzip on; | |
gzip_vary on; | |
gzip_min_length 1000; | |
gzip_proxied any; | |
gzip_types text/plain text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml; | |
gzip_disable "MSIE [1-6]\."; | |
client_max_body_size 100M; | |
proxy_set_header X-Plex-Client-Identifier $http_x_plex_client_identifier; | |
proxy_set_header X-Plex-Device $http_x_plex_device; | |
proxy_set_header X-Plex-Device-Name $http_x_plex_device_name; | |
proxy_set_header X-Plex-Platform $http_x_plex_platform; | |
proxy_set_header X-Plex-Platform-Version $http_x_plex_platform_version; | |
proxy_set_header X-Plex-Product $http_x_plex_product; | |
proxy_set_header X-Plex-Token $http_x_plex_token; | |
proxy_set_header X-Plex-Version $http_x_plex_version; | |
proxy_set_header X-Plex-Nocache $http_x_plex_nocache; | |
proxy_set_header X-Plex-Provides $http_x_plex_provides; | |
proxy_set_header X-Plex-Device-Vendor $http_x_plex_device_vendor; | |
proxy_set_header X-Plex-Model $http_x_plex_model; | |
# Web Sockets | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_redirect off; | |
proxy_buffering off; | |
} | |
location /plex { | |
proxy_pass http://127.0.0.1/web; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment