From 94c4958262e13d886521cc936f4493d67c12ef61 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 6 Feb 2024 16:10:16 +0200 Subject: [PATCH] add howto.ygg / betahowto.duckdns.org configuration --- .../howto.ygg/betahowto.duckdns.org/README.md | 17 ++++++++++++++ .../betahowto.duckdns.org/server.conf | 23 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 nginx/howto.ygg/betahowto.duckdns.org/README.md create mode 100644 nginx/howto.ygg/betahowto.duckdns.org/server.conf diff --git a/nginx/howto.ygg/betahowto.duckdns.org/README.md b/nginx/howto.ygg/betahowto.duckdns.org/README.md new file mode 100644 index 0000000..57ef5e8 --- /dev/null +++ b/nginx/howto.ygg/betahowto.duckdns.org/README.md @@ -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` \ No newline at end of file diff --git a/nginx/howto.ygg/betahowto.duckdns.org/server.conf b/nginx/howto.ygg/betahowto.duckdns.org/server.conf new file mode 100644 index 0000000..82a0a0a --- /dev/null +++ b/nginx/howto.ygg/betahowto.duckdns.org/server.conf @@ -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 '' 'YGGbro'; + } +}