mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[PR #558] [MERGED] Static site hosting and location functionality #3264
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#3264
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?
📋 Pull Request Information
Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/558
Author: @lopugit
Created: 8/14/2020
Status: ✅ Merged
Merged: 9/3/2020
Merged by: @jc21
Base:
static-content← Head:develop📝 Commits (5)
d276381Added a restart dev script which destroys then starts dev1c302c6Backend schema and migration modifications for allowing static hosts and locations37cb63bFrontend form and marionette modifications to allow static hosts and locations19f75dcMerge branch 'master' into developab0d4adMerge branch 'develop' of https://github.com/lopugit/nginx-proxy-manager into develop📊 Changes
16 files changed (+197 additions, -35 deletions)
View changed files
📝
backend/migrations/20180618015850_initial.js(+3 -0)📝
backend/schema/definitions.json(+5 -0)📝
backend/schema/endpoints/proxy-hosts.json(+51 -9)📝
backend/templates/_listen.conf(+5 -0)📝
backend/templates/_location.conf(+12 -5)📝
backend/templates/default.conf(+1 -0)📝
backend/templates/proxy_host.conf(+8 -2)📝
frontend/js/app/nginx/proxy/form.ejs(+26 -5)📝
frontend/js/app/nginx/proxy/form.js(+19 -1)📝
frontend/js/app/nginx/proxy/list/item.ejs(+7 -1)📝
frontend/js/app/nginx/proxy/location-item.ejs(+27 -6)📝
frontend/js/app/nginx/proxy/location.js(+14 -3)📝
frontend/js/i18n/messages.json(+3 -0)📝
frontend/js/models/proxy-host-location.js(+5 -2)📝
frontend/js/models/proxy-host.js(+4 -1)➕
scripts/restart-dev(+7 -0)📄 Description
I made some modifications to the proxy hosts flow which adds a static toggle which switches between proxying and static root/alias/try_files based locations.
I've modified the base proxy_hosts form and the locations one so you can mix and match between proxy hosts and locations and static hosts and locations.
There's a little bug because I'm not so experienced with Backbone marionette and I used the static toggle to change the required fields on the form from forward_host and forward_ip to index_file and root_dir. And to rerender the form to show that update I ran a this.render call which seems to break the location items rendering so you have to save the root config for a proxy host before clicking edit again to do the locations.
Here's an album of visual changes
https://imgur.com/a/qgxzYFu
You can see the template changes in
_location.conf_listen.confandproxy_host.confI had some trouble with the booleans either being 0 or 1, because in the listen forms the model values are used but in the proxy_host form the actual HTML form values are used which is integer on the checkbox's.
I think this pull request will open up nginx proxy manager to a lot more people, as SSL static hosting is one of the most sought after things on the web.
Needs a bit of polishing but that's why I pulled it into the develop branch.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.