Browse Source

update opennet location

main
ghost 12 months ago
parent
commit
1bcd1d943a
  1. 2
      README.md
  2. 38
      nginx/opennet/locations.conf
  3. 15
      nginx/opennet/locations/bsd.conf
  4. 15
      nginx/opennet/locations/cisco.conf
  5. 15
      nginx/opennet/locations/grab.conf
  6. 127
      nginx/opennet/locations/include/common.conf
  7. 15
      nginx/opennet/locations/linux.conf
  8. 15
      nginx/opennet/locations/m.conf
  9. 15
      nginx/opennet/locations/mobile.conf
  10. 15
      nginx/opennet/locations/palm.conf
  11. 15
      nginx/opennet/locations/security.conf
  12. 15
      nginx/opennet/locations/solaris.conf
  13. 15
      nginx/opennet/locations/web.conf
  14. 15
      nginx/opennet/locations/wiki.conf
  15. 15
      nginx/opennet/locations/www-less.conf
  16. 15
      nginx/opennet/locations/www.conf
  17. 3
      nginx/yggbro/README.md
  18. 2
      nginx/yggbro/opennet/README.md
  19. 2
      nginx/yggbro/opennet/handles/redirect.conf
  20. 38
      nginx/yggbro/opennet/locations.conf
  21. 15
      nginx/yggbro/opennet/locations/bsd.conf
  22. 15
      nginx/yggbro/opennet/locations/cisco.conf
  23. 15
      nginx/yggbro/opennet/locations/grab.conf
  24. 127
      nginx/yggbro/opennet/locations/include/common.conf
  25. 15
      nginx/yggbro/opennet/locations/linux.conf
  26. 15
      nginx/yggbro/opennet/locations/m.conf
  27. 15
      nginx/yggbro/opennet/locations/mobile.conf
  28. 15
      nginx/yggbro/opennet/locations/palm.conf
  29. 15
      nginx/yggbro/opennet/locations/security.conf
  30. 15
      nginx/yggbro/opennet/locations/solaris.conf
  31. 15
      nginx/yggbro/opennet/locations/web.conf
  32. 15
      nginx/yggbro/opennet/locations/wiki.conf
  33. 15
      nginx/yggbro/opennet/locations/www-less.conf
  34. 15
      nginx/yggbro/opennet/locations/www.conf
  35. 4
      nginx/yggbro/opennet/server.conf

2
README.md

@ -23,7 +23,7 @@ This repository maintained by community, feel free to share your fixes, configur
## Contribution ## Contribution
* Grab latest YGGbro version `git clone https://github.com/YGGverse/YGGbro.git` * Get latest YGGbro version `git clone https://github.com/YGGverse/YGGbro.git`
* Navigate to repo folder `cd YGGbro` * Navigate to repo folder `cd YGGbro`
* Make sure `git checkout master`, create new branch for new PR `git checkout -b some-provider-name` * Make sure `git checkout master`, create new branch for new PR `git checkout -b some-provider-name`

38
nginx/opennet/locations.conf

@ -1,38 +0,0 @@
# www-less
include /etc/yggbro/nginx/opennet/locations/www-less.conf;
# www
include /etc/yggbro/nginx/opennet/locations/www.conf;
# bsd
include /etc/yggbro/nginx/opennet/locations/bsd.conf;
# cisco
include /etc/yggbro/nginx/opennet/locations/cisco.conf;
# grab
include /etc/yggbro/nginx/opennet/locations/grab.conf;
# linux
include /etc/yggbro/nginx/opennet/locations/linux.conf;
# m
include /etc/yggbro/nginx/opennet/locations/m.conf;
# mobile
include /etc/yggbro/nginx/opennet/locations/mobile.conf;
# palm
include /etc/yggbro/nginx/opennet/locations/palm.conf;
# security
include /etc/yggbro/nginx/opennet/locations/security.conf;
# solaris
include /etc/yggbro/nginx/opennet/locations/solaris.conf;
# web
include /etc/yggbro/nginx/opennet/locations/web.conf;
# wiki
include /etc/yggbro/nginx/opennet/locations/wiki.conf;

15
nginx/opennet/locations/bsd.conf

@ -1,15 +0,0 @@
location /opennet/bsd {
# Domain source
proxy_pass https://bsd.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/bsd/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/bsd/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/bsd/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/bsd/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/bsd/";
}

15
nginx/opennet/locations/cisco.conf

@ -1,15 +0,0 @@
location /opennet/cisco {
# Domain source
proxy_pass https://cisco.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/cisco/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/cisco/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/cisco/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/cisco/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/cisco/";
}

15
nginx/opennet/locations/grab.conf

@ -1,15 +0,0 @@
location /opennet/grab {
# Domain source
proxy_pass https://grab.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/grab/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/grab/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/grab/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/grab/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/grab/";
}

127
nginx/opennet/locations/include/common.conf

@ -1,127 +0,0 @@
# Include configuration file
# Describes common rules for available locations at
# nginx/opennet/locations
# 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;
# Prevent out redirects (issue #2)
proxy_intercept_errors on;
error_page 301 302 307 = @yggbro_nginx_opennet_handles_redirect;
# Replace all matches
sub_filter_once off;
# Enable multimedia replacement
sub_filter_types *;
# Disable JS / trackers by default
sub_filter '<script' '<!-- <script';
sub_filter '</script>' '</script> -->';
# 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/opennet" target="_blank">YGGbro</a></body>';
# Links
# .
sub_filter 'http://opennet.ru' 'http://[$server_addr]/opennet';
sub_filter 'https://opennet.ru' 'http://[$server_addr]/opennet';
sub_filter 'http://opennet.me' 'http://[$server_addr]/opennet';
sub_filter 'https://opennet.me' 'http://[$server_addr]/opennet';
# www
sub_filter 'http://www.opennet.ru' 'http://[$server_addr]/opennet/www';
sub_filter 'https://www.opennet.ru' 'http://[$server_addr]/opennet/www';
sub_filter 'http://www.opennet.me' 'http://[$server_addr]/opennet/www';
sub_filter 'https://www.opennet.me' 'http://[$server_addr]/opennet/www';
# m
sub_filter 'http://m.opennet.ru' 'http://[$server_addr]/opennet/m';
sub_filter 'https://m.opennet.ru' 'http://[$server_addr]/opennet/m';
sub_filter 'http://m.opennet.me' 'http://[$server_addr]/opennet/m';
sub_filter 'https://m.opennet.me' 'http://[$server_addr]/opennet/m';
# mobile
sub_filter 'http://mobile.opennet.ru' 'http://[$server_addr]/opennet/mobile';
sub_filter 'https://mobile.opennet.ru' 'http://[$server_addr]/opennet/mobile';
sub_filter 'http://mobile.opennet.me' 'http://[$server_addr]/opennet/mobile';
sub_filter 'https://mobile.opennet.me' 'http://[$server_addr]/opennet/mobile';
# wiki
sub_filter 'http://wiki.opennet.ru' 'http://[$server_addr]/opennet/wiki';
sub_filter 'https://wiki.opennet.ru' 'http://[$server_addr]/opennet/wiki';
sub_filter 'http://wiki.opennet.me' 'http://[$server_addr]/opennet/wiki';
sub_filter 'https://wiki.opennet.me' 'http://[$server_addr]/opennet/wiki';
# solaris
sub_filter 'http://solaris.opennet.ru' 'http://[$server_addr]/opennet/solaris';
sub_filter 'https://solaris.opennet.ru' 'http://[$server_addr]/opennet/solaris';
sub_filter 'http://solaris.opennet.me' 'http://[$server_addr]/opennet/solaris';
sub_filter 'https://solaris.opennet.me' 'http://[$server_addr]/opennet/solaris';
# bsd
sub_filter 'http://bsd.opennet.ru' 'http://[$server_addr]/opennet/bsd';
sub_filter 'https://bsd.opennet.ru' 'http://[$server_addr]/opennet/bsd';
sub_filter 'http://bsd.opennet.me' 'http://[$server_addr]/opennet/bsd';
sub_filter 'https://bsd.opennet.me' 'http://[$server_addr]/opennet/bsd';
# cisco
sub_filter 'http://cisco.opennet.ru' 'http://[$server_addr]/opennet/cisco';
sub_filter 'https://cisco.opennet.ru' 'http://[$server_addr]/opennet/cisco';
sub_filter 'http://cisco.opennet.me' 'http://[$server_addr]/opennet/cisco';
sub_filter 'https://cisco.opennet.me' 'http://[$server_addr]/opennet/cisco';
# linux
sub_filter 'http://linux.opennet.ru' 'http://[$server_addr]/opennet/linux';
sub_filter 'https://linux.opennet.ru' 'http://[$server_addr]/opennet/linux';
sub_filter 'http://linux.opennet.me' 'http://[$server_addr]/opennet/linux';
sub_filter 'https://linux.opennet.me' 'http://[$server_addr]/opennet/linux';
# web
sub_filter 'http://web.opennet.ru' 'http://[$server_addr]/opennet/web';
sub_filter 'https://web.opennet.ru' 'http://[$server_addr]/opennet/web';
sub_filter 'http://web.opennet.me' 'http://[$server_addr]/opennet/web';
sub_filter 'https://web.opennet.me' 'http://[$server_addr]/opennet/web';
# security
sub_filter 'http://security.opennet.ru' 'http://[$server_addr]/opennet/security';
sub_filter 'https://security.opennet.ru' 'http://[$server_addr]/opennet/security';
sub_filter 'http://security.opennet.me' 'http://[$server_addr]/opennet/security';
sub_filter 'https://security.opennet.me' 'http://[$server_addr]/opennet/security';
# palm
sub_filter 'http://palm.opennet.ru' 'http://[$server_addr]/opennet/palm';
sub_filter 'https://palm.opennet.ru' 'http://[$server_addr]/opennet/palm';
sub_filter 'http://palm.opennet.me' 'http://[$server_addr]/opennet/palm';
sub_filter 'https://palm.opennet.me' 'http://[$server_addr]/opennet/palm';
# grab
sub_filter 'http://grab.opennet.ru' 'http://[$server_addr]/opennet/grab';
sub_filter 'https://grab.opennet.ru' 'http://[$server_addr]/opennet/grab';
sub_filter 'http://grab.opennet.me' 'http://[$server_addr]/opennet/grab';
sub_filter 'https://grab.opennet.me' 'http://[$server_addr]/opennet/grab';
# forum
sub_filter 'http://forum.opennet.ru' 'http://[$server_addr]/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
sub_filter 'https://forum.opennet.ru' 'http://[$server_addr]/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
sub_filter 'http://forum.opennet.me' 'http://[$server_addr]/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
sub_filter 'https://forum.opennet.me' 'http://[$server_addr]/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
sub_filter '/forum' '/cgi-bin/openforum/vsluhboard.cgi';
sub_filter './forum' 'http://[$server_addr]/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';

15
nginx/opennet/locations/linux.conf

@ -1,15 +0,0 @@
location /opennet/linux {
# Domain source
proxy_pass https://linux.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/linux/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/linux/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/linux/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/linux/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/linux/";
}

15
nginx/opennet/locations/m.conf

@ -1,15 +0,0 @@
location /opennet/m {
# Domain source
proxy_pass https://m.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/m/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/m/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/m/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/m/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/m/";
}

15
nginx/opennet/locations/mobile.conf

@ -1,15 +0,0 @@
location /opennet/mobile {
# Domain source
proxy_pass https://mobile.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/mobile/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/mobile/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/mobile/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/mobile/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/mobile/";
}

15
nginx/opennet/locations/palm.conf

@ -1,15 +0,0 @@
location /opennet/palm {
# Domain source
proxy_pass https://palm.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/palm/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/palm/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/palm/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/palm/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/palm/";
}

15
nginx/opennet/locations/security.conf

@ -1,15 +0,0 @@
location /opennet/security {
# Domain source
proxy_pass https://security.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/security/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/security/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/security/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/security/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/security/";
}

15
nginx/opennet/locations/solaris.conf

@ -1,15 +0,0 @@
location /opennet/solaris {
# Domain source
proxy_pass https://solaris.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/solaris/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/solaris/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/solaris/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/solaris/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/solaris/";
}

15
nginx/opennet/locations/web.conf

@ -1,15 +0,0 @@
location /opennet/web {
# Domain source
proxy_pass https://web.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/web/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/web/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/web/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/web/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/web/";
}

15
nginx/opennet/locations/wiki.conf

@ -1,15 +0,0 @@
location /opennet/wiki {
# Domain source
proxy_pass https://wiki.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/wiki/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/wiki/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/wiki/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/wiki/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/wiki/";
}

15
nginx/opennet/locations/www-less.conf

@ -1,15 +0,0 @@
location /opennet {
# Domain source
proxy_pass https://opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/opennet/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/";
}

15
nginx/opennet/locations/www.conf

@ -1,15 +0,0 @@
location /opennet/www {
# Domain source
proxy_pass https://www.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/www/';
sub_filter 'href="/' 'href="http://[$server_addr]/opennet/www/';
sub_filter 'src="/' 'src="http://[$server_addr]/opennet/www/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/opennet/www/';
sub_filter "url('/" "url('http://[$server_addr]/opennet/www/";
}

3
nginx/yggbro/README.md

@ -0,0 +1,3 @@
# Nginx proxy configuration for /yggbro subdirectory
Follow subfolder instructions to enable.

2
nginx/opennet/README.md → nginx/yggbro/opennet/README.md

@ -19,7 +19,7 @@ Current implementation forward subdomains to following proxy locations:
## Install ## Install
* `ln -s /etc/yggbro/nginx/opennet/server.conf /etc/nginx/sites-enabled/yggbro.opennet.conf` * `ln -s /etc/yggbro/nginx/yggbro/opennet/server.conf /etc/nginx/sites-enabled/yggbro.opennet.conf`
* `nginx -t` * `nginx -t`
* `service nginx reload` * `service nginx reload`

2
nginx/opennet/handles/redirect.conf → nginx/yggbro/opennet/handles/redirect.conf

@ -1,6 +1,6 @@
# Prevent out redirects (solution for issue #2) # Prevent out redirects (solution for issue #2)
location @yggbro_nginx_opennet_handles_redirect { location @yggbro_nginx_yggbro_opennet_handles_redirect {
set $original_uri $uri; set $original_uri $uri;
set $orig_loc $upstream_http_location; set $orig_loc $upstream_http_location;

38
nginx/yggbro/opennet/locations.conf

@ -0,0 +1,38 @@
# www-less
include /etc/yggbro/nginx/yggbro/opennet/locations/www-less.conf;
# www
include /etc/yggbro/nginx/yggbro/opennet/locations/www.conf;
# bsd
include /etc/yggbro/nginx/yggbro/opennet/locations/bsd.conf;
# cisco
include /etc/yggbro/nginx/yggbro/opennet/locations/cisco.conf;
# grab
include /etc/yggbro/nginx/yggbro/opennet/locations/grab.conf;
# linux
include /etc/yggbro/nginx/yggbro/opennet/locations/linux.conf;
# m
include /etc/yggbro/nginx/yggbro/opennet/locations/m.conf;
# mobile
include /etc/yggbro/nginx/yggbro/opennet/locations/mobile.conf;
# palm
include /etc/yggbro/nginx/yggbro/opennet/locations/palm.conf;
# security
include /etc/yggbro/nginx/yggbro/opennet/locations/security.conf;
# solaris
include /etc/yggbro/nginx/yggbro/opennet/locations/solaris.conf;
# web
include /etc/yggbro/nginx/yggbro/opennet/locations/web.conf;
# wiki
include /etc/yggbro/nginx/yggbro/opennet/locations/wiki.conf;

15
nginx/yggbro/opennet/locations/bsd.conf

@ -0,0 +1,15 @@
location /opennet/bsd {
# Domain source
proxy_pass https://bsd.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/bsd/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/bsd/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/bsd/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/bsd/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/bsd/";
}

15
nginx/yggbro/opennet/locations/cisco.conf

@ -0,0 +1,15 @@
location /opennet/cisco {
# Domain source
proxy_pass https://cisco.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/cisco/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/cisco/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/cisco/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/cisco/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/cisco/";
}

15
nginx/yggbro/opennet/locations/grab.conf

@ -0,0 +1,15 @@
location /opennet/grab {
# Domain source
proxy_pass https://grab.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/grab/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/grab/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/grab/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/grab/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/grab/";
}

127
nginx/yggbro/opennet/locations/include/common.conf

@ -0,0 +1,127 @@
# Include configuration file
# Describes common rules for available locations at
# nginx/opennet/locations
# 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;
# Prevent out redirects (issue #2)
proxy_intercept_errors on;
error_page 301 302 307 = @yggbro_nginx_yggbro_opennet_handles_redirect;
# Replace all matches
sub_filter_once off;
# Enable multimedia replacement
sub_filter_types *;
# Disable JS / trackers by default
sub_filter '<script' '<!-- <script';
sub_filter '</script>' '</script> -->';
# 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/opennet" target="_blank">YGGbro</a></body>';
# Links
# .
sub_filter 'http://opennet.ru' 'http://[$server_addr]/yggbro/opennet';
sub_filter 'https://opennet.ru' 'http://[$server_addr]/yggbro/opennet';
sub_filter 'http://opennet.me' 'http://[$server_addr]/yggbro/opennet';
sub_filter 'https://opennet.me' 'http://[$server_addr]/yggbro/opennet';
# www
sub_filter 'http://www.opennet.ru' 'http://[$server_addr]/yggbro/opennet/www';
sub_filter 'https://www.opennet.ru' 'http://[$server_addr]/yggbro/opennet/www';
sub_filter 'http://www.opennet.me' 'http://[$server_addr]/yggbro/opennet/www';
sub_filter 'https://www.opennet.me' 'http://[$server_addr]/yggbro/opennet/www';
# m
sub_filter 'http://m.opennet.ru' 'http://[$server_addr]/yggbro/opennet/m';
sub_filter 'https://m.opennet.ru' 'http://[$server_addr]/yggbro/opennet/m';
sub_filter 'http://m.opennet.me' 'http://[$server_addr]/yggbro/opennet/m';
sub_filter 'https://m.opennet.me' 'http://[$server_addr]/yggbro/opennet/m';
# mobile
sub_filter 'http://mobile.opennet.ru' 'http://[$server_addr]/yggbro/opennet/mobile';
sub_filter 'https://mobile.opennet.ru' 'http://[$server_addr]/yggbro/opennet/mobile';
sub_filter 'http://mobile.opennet.me' 'http://[$server_addr]/yggbro/opennet/mobile';
sub_filter 'https://mobile.opennet.me' 'http://[$server_addr]/yggbro/opennet/mobile';
# wiki
sub_filter 'http://wiki.opennet.ru' 'http://[$server_addr]/yggbro/opennet/wiki';
sub_filter 'https://wiki.opennet.ru' 'http://[$server_addr]/yggbro/opennet/wiki';
sub_filter 'http://wiki.opennet.me' 'http://[$server_addr]/yggbro/opennet/wiki';
sub_filter 'https://wiki.opennet.me' 'http://[$server_addr]/yggbro/opennet/wiki';
# solaris
sub_filter 'http://solaris.opennet.ru' 'http://[$server_addr]/yggbro/opennet/solaris';
sub_filter 'https://solaris.opennet.ru' 'http://[$server_addr]/yggbro/opennet/solaris';
sub_filter 'http://solaris.opennet.me' 'http://[$server_addr]/yggbro/opennet/solaris';
sub_filter 'https://solaris.opennet.me' 'http://[$server_addr]/yggbro/opennet/solaris';
# bsd
sub_filter 'http://bsd.opennet.ru' 'http://[$server_addr]/yggbro/opennet/bsd';
sub_filter 'https://bsd.opennet.ru' 'http://[$server_addr]/yggbro/opennet/bsd';
sub_filter 'http://bsd.opennet.me' 'http://[$server_addr]/yggbro/opennet/bsd';
sub_filter 'https://bsd.opennet.me' 'http://[$server_addr]/yggbro/opennet/bsd';
# cisco
sub_filter 'http://cisco.opennet.ru' 'http://[$server_addr]/yggbro/opennet/cisco';
sub_filter 'https://cisco.opennet.ru' 'http://[$server_addr]/yggbro/opennet/cisco';
sub_filter 'http://cisco.opennet.me' 'http://[$server_addr]/yggbro/opennet/cisco';
sub_filter 'https://cisco.opennet.me' 'http://[$server_addr]/yggbro/opennet/cisco';
# linux
sub_filter 'http://linux.opennet.ru' 'http://[$server_addr]/yggbro/opennet/linux';
sub_filter 'https://linux.opennet.ru' 'http://[$server_addr]/yggbro/opennet/linux';
sub_filter 'http://linux.opennet.me' 'http://[$server_addr]/yggbro/opennet/linux';
sub_filter 'https://linux.opennet.me' 'http://[$server_addr]/yggbro/opennet/linux';
# web
sub_filter 'http://web.opennet.ru' 'http://[$server_addr]/yggbro/opennet/web';
sub_filter 'https://web.opennet.ru' 'http://[$server_addr]/yggbro/opennet/web';
sub_filter 'http://web.opennet.me' 'http://[$server_addr]/yggbro/opennet/web';
sub_filter 'https://web.opennet.me' 'http://[$server_addr]/yggbro/opennet/web';
# security
sub_filter 'http://security.opennet.ru' 'http://[$server_addr]/yggbro/opennet/security';
sub_filter 'https://security.opennet.ru' 'http://[$server_addr]/yggbro/opennet/security';
sub_filter 'http://security.opennet.me' 'http://[$server_addr]/yggbro/opennet/security';
sub_filter 'https://security.opennet.me' 'http://[$server_addr]/yggbro/opennet/security';
# palm
sub_filter 'http://palm.opennet.ru' 'http://[$server_addr]/yggbro/opennet/palm';
sub_filter 'https://palm.opennet.ru' 'http://[$server_addr]/yggbro/opennet/palm';
sub_filter 'http://palm.opennet.me' 'http://[$server_addr]/yggbro/opennet/palm';
sub_filter 'https://palm.opennet.me' 'http://[$server_addr]/yggbro/opennet/palm';
# grab
sub_filter 'http://grab.opennet.ru' 'http://[$server_addr]/yggbro/opennet/grab';
sub_filter 'https://grab.opennet.ru' 'http://[$server_addr]/yggbro/opennet/grab';
sub_filter 'http://grab.opennet.me' 'http://[$server_addr]/yggbro/opennet/grab';
sub_filter 'https://grab.opennet.me' 'http://[$server_addr]/yggbro/opennet/grab';
# forum
sub_filter 'http://forum.opennet.ru' 'http://[$server_addr]/yggbro/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
sub_filter 'https://forum.opennet.ru' 'http://[$server_addr]/yggbro/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
sub_filter 'http://forum.opennet.me' 'http://[$server_addr]/yggbro/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
sub_filter 'https://forum.opennet.me' 'http://[$server_addr]/yggbro/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
sub_filter '/forum' '/cgi-bin/openforum/vsluhboard.cgi';
sub_filter './forum' 'http://[$server_addr]/yggbro/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';

15
nginx/yggbro/opennet/locations/linux.conf

@ -0,0 +1,15 @@
location /opennet/linux {
# Domain source
proxy_pass https://linux.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/linux/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/linux/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/linux/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/linux/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/linux/";
}

15
nginx/yggbro/opennet/locations/m.conf

@ -0,0 +1,15 @@
location /opennet/m {
# Domain source
proxy_pass https://m.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/m/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/m/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/m/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/m/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/m/";
}

15
nginx/yggbro/opennet/locations/mobile.conf

@ -0,0 +1,15 @@
location /opennet/mobile {
# Domain source
proxy_pass https://mobile.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/mobile/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/mobile/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/mobile/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/mobile/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/mobile/";
}

15
nginx/yggbro/opennet/locations/palm.conf

@ -0,0 +1,15 @@
location /opennet/palm {
# Domain source
proxy_pass https://palm.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/palm/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/palm/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/palm/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/palm/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/palm/";
}

15
nginx/yggbro/opennet/locations/security.conf

@ -0,0 +1,15 @@
location /opennet/security {
# Domain source
proxy_pass https://security.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/security/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/security/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/security/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/security/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/security/";
}

15
nginx/yggbro/opennet/locations/solaris.conf

@ -0,0 +1,15 @@
location /opennet/solaris {
# Domain source
proxy_pass https://solaris.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/solaris/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/solaris/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/solaris/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/solaris/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/solaris/";
}

15
nginx/yggbro/opennet/locations/web.conf

@ -0,0 +1,15 @@
location /opennet/web {
# Domain source
proxy_pass https://web.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/web/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/web/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/web/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/web/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/web/";
}

15
nginx/yggbro/opennet/locations/wiki.conf

@ -0,0 +1,15 @@
location /opennet/wiki {
# Domain source
proxy_pass https://wiki.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/wiki/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/wiki/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/wiki/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/wiki/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/wiki/";
}

15
nginx/yggbro/opennet/locations/www-less.conf

@ -0,0 +1,15 @@
location /opennet {
# Domain source
proxy_pass https://opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/opennet/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/";
}

15
nginx/yggbro/opennet/locations/www.conf

@ -0,0 +1,15 @@
location /opennet/www {
# Domain source
proxy_pass https://www.opennet.ru/;
# Include common rules
include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf;
# Relative paths
sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet/www/';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet/www/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet/www/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet/www/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet/www/";
}

4
nginx/opennet/server.conf → nginx/yggbro/opennet/server.conf

@ -8,8 +8,8 @@ server {
deny all; deny all;
# Include handles # Include handles
include /etc/yggbro/nginx/opennet/handles/redirect.conf; include /etc/yggbro/nginx/yggbro/opennet/handles/redirect.conf;
# Include available locations # Include available locations
include /etc/yggbro/nginx/opennet/locations.conf; include /etc/yggbro/nginx/yggbro/opennet/locations.conf;
} }
Loading…
Cancel
Save