151 lines
4.0 KiB
Plaintext
151 lines
4.0 KiB
Plaintext
|
|
|
|
# redirect all traffic to https
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
server_name *.faiyts.media faiyts.media;
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
|
|
location /nginx_status {
|
|
stub_status on;
|
|
access_log off;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
# server {
|
|
# listen 80;
|
|
# server_name pls.go;
|
|
#
|
|
# location /sonarr {
|
|
# return 301 http://192.168.0.101:8989$request_uri;
|
|
# }
|
|
#
|
|
# location /radarr {
|
|
# return 301 http://192.168.0.101:7878$request_uri; # Replace with your Radarr instance
|
|
# }
|
|
#
|
|
# # Repeat the location blocks for other services like lidarr, sabnzbd, utorrent, portainer
|
|
#
|
|
# # Example for lidarr
|
|
# location /lidarr {
|
|
# return 301 http://192.168.0.101:8686$request_uri; # Replace with your Lidarr instance
|
|
# }
|
|
#
|
|
# # Add more location blocks as needed
|
|
# }
|
|
|
|
|
|
# Redirect HTTPS to internal services
|
|
# server {
|
|
# listen 443 ssl http2;
|
|
# server_name pls.go;
|
|
#
|
|
# # Include your SSL certificate and key paths
|
|
# # ssl_certificate /path/to/your/ssl_certificate.crt;
|
|
# # ssl_certificate_key /path/to/your/ssl_certificate.key;
|
|
#
|
|
# location /sonarr {
|
|
# return 301 http://192.168.0.101:8989$request_uri;
|
|
# }
|
|
#
|
|
# location /radarr {
|
|
# return 301 http://192.168.0.101:7878$request_uri; # Replace with your Radarr instance
|
|
# }
|
|
#
|
|
# # Repeat the location blocks for other services like lidarr, sabnzbd, utorrent, portainer
|
|
#
|
|
# # Example for lidarr
|
|
# location /lidarr {
|
|
# return 301 http://192.168.0.101:8686$request_uri; # Replace with your Lidarr instance
|
|
# }
|
|
#
|
|
# location /readarr {
|
|
# return 301 http://192.168.0.101:8787$request_uri; # Replace with your Lidarr instance
|
|
# }
|
|
#
|
|
# location /portainer {
|
|
# return 301 https://192.168.0.109:9443$request_uri; # Replace with your Lidarr instance
|
|
# }
|
|
#
|
|
# location /bazarr {
|
|
# return 301 http://192.168.0.101:6767$request_uri; # Replace with your Lidarr instance
|
|
# }
|
|
#
|
|
# location /prowlarr {
|
|
# return 301 http://192.168.0.101:9696$request_uri; # Replace with your Lidarr instance
|
|
# }
|
|
#
|
|
# location /update {
|
|
# return 301 http://192.168.0.248:3001$resquest_uri;
|
|
# }
|
|
#
|
|
#
|
|
#
|
|
# # Add more location blocks as needed
|
|
# }
|
|
# server {
|
|
# listen 80;
|
|
# listen [::]:80;
|
|
# server_name *.faiyts.media faiyts.media usenet.faiyts.media torrent.faiyts.media tv.faiyts.media movies.faiyts.media
|
|
# return 301 https://$host$request_uri;
|
|
# }
|
|
|
|
# main server block
|
|
server {
|
|
listen 443 ssl http2 default_server;
|
|
listen [::]:443 ssl http2 default_server;
|
|
|
|
server_name _;
|
|
|
|
root /config/www;
|
|
index index.html index.htm index.php;
|
|
|
|
# enable subfolder method reverse proxy confs
|
|
include /config/nginx/proxy-confs/*.subfolder.conf;
|
|
|
|
# enable for ldap auth (requires ldap-location.conf in the location block)
|
|
#include /config/nginx/ldap-server.conf;
|
|
|
|
# enable for Authelia (requires authelia-location.conf in the location block)
|
|
#include /config/nginx/authelia-server.conf;
|
|
|
|
location / {
|
|
# enable for basic auth
|
|
#auth_basic "Restricted";
|
|
#auth_basic_user_file /config/nginx/.htpasswd;
|
|
|
|
# enable for ldap auth (requires ldap-server.conf in the server block)
|
|
#include /config/nginx/ldap-location.conf;
|
|
|
|
# enable for Authelia (requires authelia-server.conf in the server block)
|
|
#include /config/nginx/authelia-location.conf;
|
|
|
|
try_files $uri $uri/ /index.html /index.php$is_args$args =404;
|
|
}
|
|
|
|
location ~ ^(.+\.php)(.*)$ {
|
|
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
fastcgi_index index.php;
|
|
include /etc/nginx/fastcgi_params;
|
|
}
|
|
|
|
# deny access to .htaccess/.htpasswd files
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
}
|
|
|
|
# enable subdomain method reverse proxy confs
|
|
include /config/nginx/proxy-confs/*.subdomain.conf;
|
|
# enable proxy cache for auth
|
|
proxy_cache_path cache/ keys_zone=auth_cache:10m;
|