Browse Source

add mentallandscape.com

main
ghost 9 months ago
parent
commit
535225f395
  1. 6
      README.md
  2. 17
      nginx/mentallandscape.com/mentallandscape.com.bro.ygg/README.md
  3. 38
      nginx/mentallandscape.com/mentallandscape.com.bro.ygg/server.conf
  4. 39
      nginx/mentallandscape.com/yggbro/mentallandscape.com/README.md
  5. 26
      nginx/mentallandscape.com/yggbro/mentallandscape.com/location.conf
  6. 15
      nginx/mentallandscape.com/yggbro/mentallandscape.com/server.conf

6
README.md

@ -66,3 +66,9 @@ _*YGGbro project provides free namespace `.bro.ygg` for Yggdrasil proxy instance
* [texty.org.ua](https://texty.org.ua/) | [nginx](https://github.com/YGGverse/YGGbro/tree/main/nginx/texty.org.ua) * [texty.org.ua](https://texty.org.ua/) | [nginx](https://github.com/YGGverse/YGGbro/tree/main/nginx/texty.org.ua)
+ `http://[201:5eb5:f061:678e:7565:6338:c02c:5251]/yggbro/texty.org.ua/` | [nginx](https://github.com/YGGverse/YGGbro/tree/main/nginx/texty.org.ua/yggbro/texty.org.ua) + `http://[201:5eb5:f061:678e:7565:6338:c02c:5251]/yggbro/texty.org.ua/` | [nginx](https://github.com/YGGverse/YGGbro/tree/main/nginx/texty.org.ua/yggbro/texty.org.ua)
+ `http://texty.org.ua.bro.ygg` | [nginx](https://github.com/YGGverse/YGGbro/tree/main/nginx/texty.org.ua/texty.org.ua.bro.ygg) + `http://texty.org.ua.bro.ygg` | [nginx](https://github.com/YGGverse/YGGbro/tree/main/nginx/texty.org.ua/texty.org.ua.bro.ygg)
#### Documentary
* [mentallandscape.com](http://mentallandscape.com/) | [nginx](https://github.com/YGGverse/YGGbro/tree/main/nginx/mentallandscape.com)
+ `http://[201:5eb5:f061:678e:7565:6338:c02c:5251]/yggbro/mentallandscape.com/` | [nginx](https://github.com/YGGverse/YGGbro/tree/main/nginx/mentallandscape.com/yggbro/mentallandscape.com)
+ `http://mentallandscape.com.bro.ygg` | [nginx](https://github.com/YGGverse/YGGbro/tree/main/nginx/mentallandscape.com/mentallandscape.com.bro.ygg)

17
nginx/mentallandscape.com/mentallandscape.com.bro.ygg/README.md

@ -0,0 +1,17 @@
# Nginx proxy configuration for mentallandscape.com.bro.ygg
Current implementation drops all JS and forward links to following locations:
* `mentallandscape.com` > `mentallandscape.com.bro.ygg`
## Install
* `ln -s /etc/yggbro/nginx/mentallandscape.com/mentallandscape.com.bro.ygg/server.conf /etc/nginx/sites-enabled/yggbro.mentallandscape.com.mentallandscape.com.bro.ygg.conf`
* `nginx -t`
* `service nginx reload`
## Uninstall
* `rm /etc/nginx/sites-enabled/yggbro.mentallandscape.com.mentallandscape.com.bro.ygg.conf`
* `nginx -t`
* `service nginx reload`

38
nginx/mentallandscape.com/mentallandscape.com.bro.ygg/server.conf

@ -0,0 +1,38 @@
server {
# HTTP/IPv6 only
listen [::]:80;
# Yggdrasil only
allow 0200::/7;
deny all;
server_name mentallandscape.com.bro.ygg;
location / {
# Forward to server
proxy_pass http://mentallandscape.com/;
# 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 *;
sub_filter 'http://mentallandscape.com' 'http://mentallandscape.com.bro.ygg';
sub_filter 'https://mentallandscape.com' 'http://mentallandscape.com.bro.ygg';
sub_filter '<script' '<!-- <script';
sub_filter '</script>' '</script> -->';
sub_filter 'href="/support/"' 'href="https://mentallandscape.com/p/support"';
sub_filter 'href="/' 'href="http://mentallandscape.com.bro.ygg/';
sub_filter 'src="/' 'src="http://mentallandscape.com.bro.ygg/';
sub_filter 'data-src="/' 'src="http://mentallandscape.com.bro.ygg/';
sub_filter "url('/" "url('http://mentallandscape.com.bro.ygg/";
# 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/mentallandscape.com/mentallandscape.com.bro.ygg" target="_blank">YGGbro</a></body>';
}
}

39
nginx/mentallandscape.com/yggbro/mentallandscape.com/README.md

@ -0,0 +1,39 @@
# Nginx proxy configuration for /yggbro/mentallandscape.com subfolder location
Current implementation drops all JS and forward links to following locations:
* `mentallandscape.com` > `/yggbro/mentallandscape.com`
## Install
This is subfolder configuration, use `server.conf` preset only when `default_server` not defined in your system:
* `ln -s /etc/yggbro/nginx/mentallandscape.com/yggbro/mentallandscape.com/server.conf /etc/nginx/sites-enabled/yggbro.mentallandscape.com.yggbro.mentallandscape.com.conf`
Alternatively, add following line to existing `default_server`:
```
include /etc/yggbro/nginx/mentallandscape.com/yggbro/mentallandscape.com/location.conf;
```
Test configuration and apply changes
* `nginx -t`
* `service nginx reload`
## Uninstall
Remove symlink if exists:
* `rm /etc/nginx/sites-enabled/yggbro.mentallandscape.com.yggbro.mentallandscape.com.conf`
Remove following line from existing `default_server`:
```
include /etc/yggbro/nginx/mentallandscape.com/yggbro/mentallandscape.com/location.conf;
```
Test configuration and apply changes
* `nginx -t`
* `service nginx reload`

26
nginx/mentallandscape.com/yggbro/mentallandscape.com/location.conf

@ -0,0 +1,26 @@
location /yggbro/mentallandscape.com {
# Forward to server
proxy_pass http://mentallandscape.com/;
# 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 *;
sub_filter 'http://mentallandscape.com' 'http://[$server_addr]/yggbro/mentallandscape.com';
sub_filter 'https://mentallandscape.com' 'http://[$server_addr]/yggbro/mentallandscape.com';
sub_filter '<script' '<!-- <script';
sub_filter '</script>' '</script> -->';
sub_filter 'href="/support/"' 'href="https://mentallandscape.com/p/support"';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/mentallandscape.com/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/mentallandscape.com/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/mentallandscape.com/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/mentallandscape.com/";
# 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/mentallandscape.com/yggbro/mentallandscape.com" target="_blank">YGGbro</a></body>';
}

15
nginx/mentallandscape.com/yggbro/mentallandscape.com/server.conf

@ -0,0 +1,15 @@
server {
# HTTP/IPv6 connections only
listen [::]:80 default_server; # make sure default_server not exists or throw an exception
# Yggdrasil connections only
allow 0200::/7;
deny all;
# Listen defaults
server_name _;
# Include available locations
include /etc/yggbro/nginx/mentallandscape.com/yggbro/mentallandscape.com/location.conf;
}
Loading…
Cancel
Save