mirror of
https://github.com/YGGverse/YGGbro.git
synced 2026-03-31 17:45:36 +00:00
add howto.ygg / betahowto.duckdns.org configuration
This commit is contained in:
parent
20c08da92b
commit
94c4958262
2 changed files with 40 additions and 0 deletions
17
nginx/howto.ygg/betahowto.duckdns.org/README.md
Normal file
17
nginx/howto.ygg/betahowto.duckdns.org/README.md
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Nginx proxy configuration for betahowto.duckdns.org
|
||||||
|
|
||||||
|
Current implementation drops all JS and forward links to following locations:
|
||||||
|
|
||||||
|
* `betahowto.duckdns.org` > `howto.ygg`
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
* `ln -s /etc/yggbro/nginx/howto.ygg/betahowto.duckdns.org/server.conf /etc/nginx/sites-enabled/howto.ygg.betahowto.duckdns.org.conf`
|
||||||
|
* `nginx -t`
|
||||||
|
* `service nginx reload`
|
||||||
|
|
||||||
|
## Uninstall
|
||||||
|
|
||||||
|
* `rm /etc/nginx/sites-enabled/howto.ygg.betahowto.duckdns.org.conf`
|
||||||
|
* `nginx -t`
|
||||||
|
* `service nginx reload`
|
||||||
23
nginx/howto.ygg/betahowto.duckdns.org/server.conf
Normal file
23
nginx/howto.ygg/betahowto.duckdns.org/server.conf
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
server {
|
||||||
|
|
||||||
|
listen 0.0.0.0:80;
|
||||||
|
|
||||||
|
server_name betahowto.duckdns.org;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
|
||||||
|
# Forward to server
|
||||||
|
proxy_pass http://howto.ygg;
|
||||||
|
|
||||||
|
# Tell to server, that's proxy request
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
||||||
|
# Replace links
|
||||||
|
sub_filter_once off;
|
||||||
|
sub_filter_types *;
|
||||||
|
|
||||||
|
# Feedback link to project repository
|
||||||
|
sub_filter '</body>' '<a style="position:fixed;top:20px;right:20px;z-index:999" href="https://github.com/YGGverse/YGGbro/tree/main/nginx/howto.ygg/betahowto.duckdns.org" target="_blank">YGGbro</a></body>';
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue