Authelia nginx pathprefix - Stack Overflow

i have a question about how to host authelia using a PathPrefix authelia rather than a subdomain with

i have a question about how to host authelia using a PathPrefix /authelia rather than a subdomain with nginx? i found solution for traiefik

I tried to set

server:
  address: 'tcp://0.0.0.0:9091/authelia'

and my nginx.conf have locations to server static files

http {
    resolver 127.0.0.11;
    server_tokens off;
    charset utf-8; 
    
    
    server {
        listen 443 ssl;
        server_name datalens.radsciens.ru;
    
        include /config/nginx/snippets/ssl.conf;

        # Datalens with Authelia
        location /datalens/ {
            auth_request /authelia/api/verify;
            auth_request_set $user $upstream_http_remote_user;
            proxy_pass http://datalens:8080/collections;
        }

        location /authelia/ {
            proxy_pass http://authelia:9091/authelia/;
            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_set_header X-Forwarded-Host $host;
            proxy_set_header X-Forwarded-Uri /authelia/;
            proxy_set_header X-Forwarded-Prefix /authelia;
            rewrite ^/authelia(/.*)$ $1 break;
        }

        # Ensure static files are routed correctly
        location /authelia/static/ {
            proxy_pass http://authelia:9091/authelia/static/;
        }

    }
}

but authelia try get files just from /static/ not from /authelia/static/ it's looks like this

Thanks for your help!

enter image description here

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744198493a4562768.html

相关推荐

  • Authelia nginx pathprefix - Stack Overflow

    i have a question about how to host authelia using a PathPrefix authelia rather than a subdomain with

    8天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信