User Tools

Site Tools


docker:nginx_proxy_manager:forward_to_a_directory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
docker:nginx_proxy_manager:forward_to_a_directory [2025/07/21 09:06] – created peterdocker:nginx_proxy_manager:forward_to_a_directory [2025/07/21 09:18] (current) peter
Line 9: Line 9:
 ===== Solution ===== ===== Solution =====
  
-In **Custom Locations"+In **Custom Locations**:
  
   * **Location** - set to **/**.   * **Location** - set to **/**.
   * **Forward Location** - set to **192.168.1.1:8080/sub/**.   * **Forward Location** - set to **192.168.1.1:8080/sub/**.
 +    * It is important that there is a / at the end!
  
  
 +----
 +
 +===== Other approach =====
 +
 +In **Advanced**:
 +
 +<code>
 +location / {
 +    proxy_pass http://192.168.1.1:8000/custom_dir/;
 +}
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  Visiting domain.com displays the contents of 192.168.1.1:8000/custom_dir/ without redirecting.
 +</WRAP>
 +
 +----
 +
 +===== Another Approach =====
 +
 +In **Advanced**:
 +
 +<code>
 +location = /{return 301 $scheme://$http_host/admin/;
 +</code>
 +
 +----
 +
 +===== Another Approach =====
 +
 +In **Advanced**:
 +
 +<code>
 +location = /{return 301 $scheme://$http_host/admin/;
 +
 +location / {
 +    # Proxy!
 +    include conf.d/include/proxy.conf;
 +}
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  This has 2 locations.
 +
 +  * One with = sign
 +  * One without.
 +    * This is optional...
 +
 +</WRAP>
  
docker/nginx_proxy_manager/forward_to_a_directory.1753088776.txt.gz · Last modified: 2025/07/21 09:06 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki