Quantcast
Channel: Home Assistant Community Add-on: Nginx Proxy Manager
Viewing all articles
Browse latest Browse all 615

Home Assistant Community Add-on: Nginx Proxy Manager

$
0
0

@ozzi91 @Klagio
For those of you who are getting white pages for subfolders:
Like mydomain.duckdns.org/nginx you have to setup a base url inside your app as well. If your app doesn’t support it then you need to add additional nginx config settings for that subfolder location so that nginx does the rewriting for you instead of the app.

  • Example 1 (app supports base URL reverse proxy): if you have Sonarr / Radarr (or any rrs) on your network and you want it to be on mydomain.duckdns.org/sonarr . Then all you have to do after you add the record in the NPM is in your Sonarr app go to general settings and add “/sonarr” in the base URL setting and that will fix the white page issue. Sonarr will know how to rewrite URLs and you will be all set.

  • Example 2: Some apps don’t have a setting for Base url (like your router) so then you have to click on a little gear icon when you are setting up your subfolder in NPM and paste the specific config settings.

Here is an example for Plex below. Just update the local IP of your plex server. You can also see the bottom part of the code rewrites and adds /web to the URL since plex’s portal uses /web for everything.

location /plex/ {
    rewrite /plex(/.*) $1 break;

    proxy_pass http://172.16.3.8:32400;
    proxy_http_version 1.1;
    proxy_set_header Accept-Encoding "";
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $http_host;
    proxy_cache_bypass $http_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_redirect off;

    sub_filter '/web/' '/plex/web/';
    sub_filter_types *;
    sub_filter_once off;
}

You can use the above example to try to set up other apps you might have…
If you are like me and you don’t really understand how that stuff above works and your app doesn’t support base url settings rewrite (ex: NPM, your Router) then you can google for “base url rewrite config for appname” and you will sometimes find something like the snippet above. When you paste the code you find on the net though make sure you ignore server { } snippets as those are for the entire nginx server and you just need it for your subfolder.

If interested I also have configs for: deluge, nzbget, adguard and glances. PM me and ill send them to you. If anyone finds the rewrites for Synology router that would be lovely :slight_smile:

Read full topic


Viewing all articles
Browse latest Browse all 615

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>