jlesage / docker-nginx-proxy-manager

Docker container for Nginx Proxy Manager
MIT License
756 stars 166 forks source link

How to add Snippets for Authelia like official Docs said #275

Open masterwishx opened 1 year ago

masterwishx commented 1 year ago

used IBRACORP guide for Authelia + NPM +Cloudflare , but in Official Docs of Authelia snippets used ,is it possible to add snippets here ? https://www.authelia.com/integration/proxies/nginx-proxy-manager/

jlesage commented 1 year ago

If I understand your question correctly, you want to know if this container can work with Authelia ? So to answer is yes, this should work.

masterwishx commented 1 year ago

So to answer is yes, this should work.

Sorry if not explained correctly, it's working with Authelia by guide. But from official way of Authelia is to use snippets. So the question is: How to add snippets to NPM correctly?

jlesage commented 1 year ago

Can you precise which part of the guide you are talking about ?

From https://www.authelia.com/integration/proxies/nginx-proxy-manager/, it is mentioned that the snippets configuration files are mapped to the container like this:

    volumes:
      - ${PWD}/data/nginx/snippets:/config/nginx/snippets:ro

Then, they are used by adding a custom configuration to NPM:

location / {
    include /snippets/proxy.conf;
    proxy_pass $forward_scheme://$server:$port;
}

You can do the same thing with this container.

masterwishx commented 1 year ago

I didn't find snippets dir in container exist. But if you say I can use here they example , I will try to make it. Thanks

jlesage commented 1 year ago

It is the volume configuration that will add it.

    volumes:
      - ${PWD}/data/nginx/snippets:/config/nginx/snippets:ro
masterwishx commented 1 year ago

im using Unraid, so it should be ,i think:

/mnt/user/appdata/NginxProxyManager/nginx/snippets : /config/nginx/snippets:ro

jlesage commented 1 year ago

If your snippets are already under /mnt/user/appdata/NginxProxyManager/nginx/snippets, then you don't need to add another volume mapping.

masterwishx commented 1 year ago

No I don't have it. I meaned to create volume like this

jlesage commented 1 year ago

So where do you plan to store your snippets on the unRAID ?

Storing them under /mnt/user/appdata/NginxProxyManager/nginx/snippets seems to be the easiest way.

masterwishx commented 1 year ago

Storing them under /mnt/user/appdata/NginxProxyManager/nginx/snippets seems to be the easiest way

Yes, here. Thanks