mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 09:25:55 +03:00
[GH-ISSUE #575] How to use Custom Nginx Configuration in Edit Proxy Host / Advanced #483
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#483
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @QuantiumDev on GitHub (Aug 24, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/575
Checklist
What is troubling you?
In Edit Proxy Host/Advanced - could someone please point me to some documentation for using this? I tried to paste an Nginx server block in there but no matter what I enter there, it causes the status to go OFFLINE until I delete the contents of that box.
I'm hoping there's a way to use this to set the root document path? If so, it would make it a lot easier to host multiple sites. (Or is there some other/better way to accomplish that?)
@gregfr commented on GitHub (Aug 24, 2020):
Here is a simple working one:
It will redirect to the login page (of the site) if the URL is just the site name.
@QuantiumDev commented on GitHub (Aug 26, 2020):
Thanks for the response but I don't really need to redirect. I'm trying to setup multiple proxy hosts so that each one will serve a different website. So I need to be able to specify the root document path. Any idea how to do that in the Advanced tab?
@QuantiumDev commented on GitHub (Aug 26, 2020):
In case anyone else has this issue and finds their way here, this may help... Using gregfr’s suggestion, I set the document root in my main docker-compose file (the one that spins up my LEMP stack) to the parent directory for my websites. For my server, that looks like /media/datastore/websrv (then each of my hosted websites has its own directory below that - e.g. mywebsite1.com, mywebsite2.net, etc.) Then, in the advanced section for each proxy host, I use a modified version of gregfr’s code...
While this works, it has the following undesirable result: when I go to http://www.mywebsite1.com, it does get me to the correct home page for the site - but the URL shown in my browser’s address bar is: http://www.mywebsite1.com/mywebsite1.com/index.php
This works in general - if I try to go to another page on the site or display an image by typing in http://www.mywebsite1.com/img/banner.jpg it does display the image - but the url looks like http://www.mywebsite1.com/mywebsite1.com/img/banner.jpg
Functional, but kludgey.
If I renamed my website directories using abbreviations (like ws1, ws2, etc.) it might look a little better: http://www.mywebsite1.com/ws1/index.php but I’m sure there’s a better way of doing this and I’m hoping someone ( @jc21 ?) will post the proper solution for setting the document root via the advanced tab so everything just works without the wonky url.
@chaptergy commented on GitHub (May 12, 2021):
The content of the advanced tab input will be inserted within the server configuration block of your host. The advanced data of your location will be inserted inside the location block.