Closed GuiPoM closed 1 year ago
If you're enabling Authelia, you can comment out the allow/deny lines. They are responsible for only allowing connections from the lan and denying all else
Here is my current swag/config/nginx/proxy-confs/dashboard.subdomain.conf There is no longer allow/deny there.
I also added a section
#include /config/nginx/external.conf;
include /config/nginx/internal.conf;
That is not the reason for my issue as it also does not work without it, but this is a enhancement I will suggest latest to swag to apply to all proxy files to easily tag a proxy as internal or public facing proxy.
Here is the config:
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;
#include /config/nginx/external.conf;
include /config/nginx/internal.conf;
# 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;
try_files $uri $uri/ /index.php?$args =404;
}
location ~ \.php$ {
# 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;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is locked due to inactivity
Hello,
I am using Swag deployed on my NAS together with Authelia. I am also activating some mods, including the nice Dashboard mod. With this mod comes a proxy configuration, dashboard.subdomain.conf.
If I keep the configuration untouched, i.e. as deployed by the mod, the dashboard is working and can be accessed.
Even if this configuration restricts access to dashboard to internal IPs, I want to control who has access to this page. So I uncomment the classic two lines for enabling Authelia on server and on location sections as I am doing for many of my proxies.
Then I get a 403 when I try to access the same dashboard url.
I must add that Authelia is working well on all my proxies, this includes password as well as Openid connect services. So Authelia is working, and Swag is also working, and Authelia combined with Swag are also working on all my proxies. Dashboard is this only proxy for which I have an issue.
Expected Behavior
When I access to dashboard.domain.com, Authelia prompts me for a login, if needed, then redirect to that page.
Current Behavior
I get a 403.
Steps to Reproduce
Deploy swag and authelia as described in the documentation. For swag, activate the dashboard mod. Then go to swag/config/nginx/proxy-confs/dashboard.subdomain.conf and activate two lines: l71/72
enable for Authelia
l83/84
enable for Authelia
Environment
OS: Debian 10, OMV 5.6.26-1. CPU architecture: x86_64 (Intel Pentium Gold G6400) How docker service was installed: Installed from OMV UI with OMV-Extras (apt based installation)
Command used to create docker container (run/create/compose/screenshot)
I know how to change nginx log level but I did not manage to identify why the request to dashboard.domain.com is rejected