Created
February 10, 2022 18:26
-
-
Save pagdot/1b5b1cf95939679c5f80d0e54b44ab91 to your computer and use it in GitHub Desktop.
SWAG dashboard mod reverse proxy config with authelia
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
## Version 2022/01/14 | |
# Make sure that your dns has a cname set for dashboard | |
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
server_name dashboard.*; | |
root /dashboard/www; | |
index index.php; | |
include /config/nginx/ssl.conf; | |
client_max_body_size 0; | |
# enable for ldap auth, fill in ldap details in ldap.conf | |
#include /config/nginx/ldap.conf; | |
# enable for Authelia | |
include /config/nginx/authelia-server.conf; | |
location / { | |
# enable the next two lines for http auth | |
#auth_basic "Restricted"; | |
#auth_basic_user_file /config/nginx/.htpasswd; | |
# enable the next two lines for ldap auth | |
#auth_request /auth; | |
#error_page 401 =200 /ldaplogin; | |
# enable for Authelia | |
#include /config/nginx/authelia-location.conf; | |
#allow 10.0.0.0/8; | |
#allow 172.16.0.0/12; | |
#allow 192.168.0.0/16; | |
#deny all; | |
try_files $uri $uri/ /index.php?$args =404; | |
} | |
location ~ \.php$ { | |
#allow 10.0.0.0/8; | |
#allow 172.16.0.0/12; | |
#allow 192.168.0.0/16; | |
#deny all; | |
include /config/nginx/authelia-location.conf; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
include /etc/nginx/fastcgi_params; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment