mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #1913] How to add a static website for root location? #1393
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#1393
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 @jearton on GitHub (Mar 5, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1913
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
Describe alternatives you've considered
Use native nginx.
Additional context
@jearton commented on GitHub (Mar 26, 2022):
I found a solution through reading the source code. Just add the root location directive block in the proxy advanced configuration, then the root location of reverse proxy will not be generated. The relevant source code is as follows:
https://github.com/NginxProxyManager/nginx-proxy-manager/blob/develop/backend/internal/nginx.js#L220

https://github.com/NginxProxyManager/nginx-proxy-manager/blob/develop/backend/templates/proxy_host.conf#L29

@florianchevallier commented on GitHub (Feb 10, 2023):
To complete the response here :
you can create a dummy nginx conf like this :
And then add an advanced configuration like this
⚠️ the path has to be mounted in you docker / docker-compose file.
@ymjlabMax commented on GitHub (Feb 20, 2024):
I have a question.
What does http://localhost:11111/ mean?
root /deploy;
location / {
autoindex on;
autoindex_exact_size on;
autoindex_format html;
autoindex_localtime on;
}
Should the root location here be aligned with the docker-compose file location?
I'm asking because I'm currently encountering a 404 not-found error.
@dyingway commented on GitHub (Apr 4, 2024):
the guy had mention,⚠️ the path has to be mounted in you docker / docker-compose file.
i think you might don't know how to do,so i give a example,if your html files location in
/srvthen ,you should edit your docker-compose.yml like this:
then 404 will disappear
@github-actions[bot] commented on GitHub (Nov 29, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@github-actions[bot] commented on GitHub (Dec 5, 2025):
Issue was closed due to inactivity.