Table of Contents

Docker - Nginx Proxy Manager - Forward to a directory

To have something like:


Solution

In Custom Locations:


Other approach

In Advanced:

location / {
    proxy_pass http://192.168.1.1:8000/custom_dir/;
}

NOTE: Visiting domain.com displays the contents of 192.168.1.1:8000/custom_dir/ without redirecting.


Another Approach

In Advanced:

location = /{return 301 $scheme://$http_host/admin/;} 

Another Approach

In Advanced:

location = /{return 301 $scheme://$http_host/admin/;} 

location / {
    # Proxy!
    include conf.d/include/proxy.conf;
}

NOTE: This has 2 locations.

  • One with = sign
  • One without.
    • This is optional…