diff --git a/README.md b/README.md index 9c5fefb..cc78747 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ -# YGGbro +# YGGbro - proxy presets for modern servers -Collection of proxies with simple installation for Yggdrasil - -This repository maintained by community, feel free to share your fixes, configuration examples or new instances! +This project maintained by community, feel free to share your improvements or new instances! ## Install @@ -23,18 +21,24 @@ This repository maintained by community, feel free to share your fixes, configur ## Contribution -* Get latest YGGbro version `git clone https://github.com/YGGverse/YGGbro.git` +* Get latest version `git clone https://github.com/YGGverse/YGGbro.git` * Navigate to repo folder `cd YGGbro` -* Make sure `git checkout master`, create new branch for new PR `git checkout -b some-provider-name` +* Use `git checkout master` then create new branch for each new PR `git checkout -b some-provider-name` ### Nginx -* Create new folder for each new provider `mkdir nginx/some-provider-name` -* Describe inside at least one server configuration `nginx/some-provider-name/server.conf` -* Create `nginx/some-provider-name/README.md` and describe install/uninstall steps +Please, follow existing file tree and namespace model + +* Create namespace folder for new proxy source if not available yet `mkdir nginx/some-provider-name` + + Namespace folder must have same name as it `proxy_pass` target value +* Add provider folder into namespace created `mkdir nginx/some-provider-name/some-provider-alias` + + Provider folder must have same name as it `server_name` value + + For subfolder configurations, just make plain folder name without dots +* Attach at least one server file configuration `nginx/some-provider-name/some-provider-alias/server.conf` +* Create `nginx/some-provider-name/some-provider-alias/README.md` and describe install/uninstall steps * Send your PR to this repo -YGGbro project provides free namespace `.bro.ygg` for Yggdrasil proxy instances by request! +_*YGGbro project provides free namespace `.bro.ygg` for Yggdrasil proxy instances by request._ ## Registry @@ -87,14 +91,14 @@ YGGbro project provides free namespace `.bro.ygg` for Yggdrasil proxy instances * [vanilladnb.co.ua](https://vanilladnb.co.ua/) + `http://[201:23b4:991a:634d:8359:4521:5576:15b7]/yggwave/radio/vanilladnb` -If you're running own station in Yggdrasil network, take a look also: +If you're running own station in Yggdrasil network, take a look at: [YGGwave ~ The Radio Stations Catalog](https://github.com/YGGverse/YGGwave) #### IT * [opennet.ru](https://opennet.ru/) - + `http://[201:23b4:991a:634d:8359:4521:5576:15b7]/yggbro/opennet/` | [opennet.bro.ygg](http://opennet.bro.ygg) + + `http://[201:23b4:991a:634d:8359:4521:5576:15b7]/yggbro/opennet.ru/` | [opennet.ru.bro.ygg](http://opennet.ru.bro.ygg) #### News diff --git a/nginx/opennet.bro.ygg/README.md b/nginx/opennet.bro.ygg/README.md deleted file mode 100644 index 1a895ac..0000000 --- a/nginx/opennet.bro.ygg/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# Nginx proxy configuration for OpenNet located at .opennet.bro.ygg - -Current implementation forward subdomains to following locations: - -* `opennet.ru` > `http://opennet.bro.ygg` -* `www.opennet.ru` > `http://www.opennet.bro.ygg` -* `bsd.opennet.ru` > `http://bsd.opennet.bro.ygg` -* `cisco.opennet.ru` > `http://cisco.opennet.bro.ygg` -* `grab.opennet.ru` > `http://grab.opennet.bro.ygg` -* `linux.opennet.ru` > `http://linux.opennet.bro.ygg` -* `m.opennet.ru` > `http://m.opennet.bro.ygg` -* `mobile.opennet.ru` > `http://mobile.opennet.bro.ygg` -* `palm.opennet.ru` > `http://palm.opennet.bro.ygg` -* `security.opennet.ru` > `http://security.opennet.bro.ygg` -* `solaris.opennet.ru` > `http://solaris.opennet.bro.ygg` -* `web.opennet.ru` > `http://web.opennet.bro.ygg` -* `wiki.opennet.ru` > `http://wiki.opennet.bro.ygg` -* `forum.opennet.ru` > `http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi` - -## Install - -* `ln -s /etc/yggbro/nginx/opennet.bro.ygg/server.conf /etc/nginx/sites-enabled/yggbro.opennet.bro.ygg.conf` -* `nginx -t` -* `service nginx reload` - -## Uninstall - -* `rm /etc/nginx/sites-enabled/yggbro.opennet.bro.ygg.conf` -* `nginx -t` -* `service nginx reload` - -## Issues - -1. At this moment, config drops all JS some tabs could not work -2. Youtube embedded content still works -3. Redirect cases for some sub-domains require additional rules implementation \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/locations/include/common.conf b/nginx/opennet.bro.ygg/locations/include/common.conf deleted file mode 100644 index 5f82493..0000000 --- a/nginx/opennet.bro.ygg/locations/include/common.conf +++ /dev/null @@ -1,126 +0,0 @@ -# Include configuration file -# Describes common rules for available 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_bro_ygg_handles_redirect; - -# Replace all matches -sub_filter_once off; - -# Enable multimedia replacement -sub_filter_types *; - -# Disable JS / trackers by default -sub_filter '' ' -->'; - -# Feedback link to project repository -sub_filter '' 'YGGbro'; - -# Links - -# . -sub_filter 'http://opennet.ru' 'http://opennet.bro.ygg'; -sub_filter 'https://opennet.ru' 'http://opennet.bro.ygg'; - -sub_filter 'http://opennet.me' 'http://opennet.bro.ygg'; -sub_filter 'https://opennet.me' 'http://opennet.bro.ygg'; - -# www -sub_filter 'http://www.opennet.ru' 'http://www.opennet.bro.ygg'; -sub_filter 'https://www.opennet.ru' 'http://www.opennet.bro.ygg'; - -sub_filter 'http://www.opennet.me' 'http://www.opennet.bro.ygg'; -sub_filter 'https://www.opennet.me' 'http://www.opennet.bro.ygg'; - -# m -sub_filter 'http://m.opennet.ru' 'http://m.opennet.bro.ygg'; -sub_filter 'https://m.opennet.ru' 'http://m.opennet.bro.ygg'; - -sub_filter 'http://m.opennet.me' 'http://m.opennet.bro.ygg'; -sub_filter 'https://m.opennet.me' 'http://m.opennet.bro.ygg'; - -# mobile -sub_filter 'http://mobile.opennet.ru' 'http://mobile.opennet.bro.ygg'; -sub_filter 'https://mobile.opennet.ru' 'http://mobile.opennet.bro.ygg'; - -sub_filter 'http://mobile.opennet.me' 'http://mobile.opennet.bro.ygg'; -sub_filter 'https://mobile.opennet.me' 'http://mobile.opennet.bro.ygg'; - -# wiki -sub_filter 'http://wiki.opennet.ru' 'http://wiki.opennet.bro.ygg'; -sub_filter 'https://wiki.opennet.ru' 'http://wiki.opennet.bro.ygg'; - -sub_filter 'http://wiki.opennet.me' 'http://wiki.opennet.bro.ygg'; -sub_filter 'https://wiki.opennet.me' 'http://wiki.opennet.bro.ygg'; - -# solaris -sub_filter 'http://solaris.opennet.ru' 'http://solaris.opennet.bro.ygg'; -sub_filter 'https://solaris.opennet.ru' 'http://solaris.opennet.bro.ygg'; - -sub_filter 'http://solaris.opennet.me' 'http://solaris.opennet.bro.ygg'; -sub_filter 'https://solaris.opennet.me' 'http://solaris.opennet.bro.ygg'; - -# bsd -sub_filter 'http://bsd.opennet.ru' 'http://bsd.opennet.bro.ygg'; -sub_filter 'https://bsd.opennet.ru' 'http://bsd.opennet.bro.ygg'; - -sub_filter 'http://bsd.opennet.me' 'http://bsd.opennet.bro.ygg'; -sub_filter 'https://bsd.opennet.me' 'http://bsd.opennet.bro.ygg'; - -# cisco -sub_filter 'http://cisco.opennet.ru' 'http://cisco.opennet.bro.ygg'; -sub_filter 'https://cisco.opennet.ru' 'http://cisco.opennet.bro.ygg'; - -sub_filter 'http://cisco.opennet.me' 'http://cisco.opennet.bro.ygg'; -sub_filter 'https://cisco.opennet.me' 'http://cisco.opennet.bro.ygg'; - -# linux -sub_filter 'http://linux.opennet.ru' 'http://linux.opennet.bro.ygg'; -sub_filter 'https://linux.opennet.ru' 'http://linux.opennet.bro.ygg'; - -sub_filter 'http://linux.opennet.me' 'http://linux.opennet.bro.ygg'; -sub_filter 'https://linux.opennet.me' 'http://linux.opennet.bro.ygg'; - -# web -sub_filter 'http://web.opennet.ru' 'http://web.opennet.bro.ygg'; -sub_filter 'https://web.opennet.ru' 'http://web.opennet.bro.ygg'; - -sub_filter 'http://web.opennet.me' 'http://web.opennet.bro.ygg'; -sub_filter 'https://web.opennet.me' 'http://web.opennet.bro.ygg'; - -# security -sub_filter 'http://security.opennet.ru' 'http://security.opennet.bro.ygg'; -sub_filter 'https://security.opennet.ru' 'http://security.opennet.bro.ygg'; - -sub_filter 'http://security.opennet.me' 'http://security.opennet.bro.ygg'; -sub_filter 'https://security.opennet.me' 'http://security.opennet.bro.ygg'; - -# palm -sub_filter 'http://palm.opennet.ru' 'http://palm.opennet.bro.ygg'; -sub_filter 'https://palm.opennet.ru' 'http://palm.opennet.bro.ygg'; - -sub_filter 'http://palm.opennet.me' 'http://palm.opennet.bro.ygg'; -sub_filter 'https://palm.opennet.me' 'http://palm.opennet.bro.ygg'; - -# grab -sub_filter 'http://grab.opennet.ru' 'http://grab.opennet.bro.ygg'; -sub_filter 'https://grab.opennet.ru' 'http://grab.opennet.bro.ygg'; - -sub_filter 'http://grab.opennet.me' 'http://grab.opennet.bro.ygg'; -sub_filter 'https://grab.opennet.me' 'http://grab.opennet.bro.ygg'; - -# forum -sub_filter 'http://forum.opennet.ru' 'http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; -sub_filter 'https://forum.opennet.ru' 'http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; - -sub_filter 'http://forum.opennet.me' 'http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; -sub_filter 'https://forum.opennet.me' 'http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; - -sub_filter '/forum' '/cgi-bin/openforum/vsluhboard.cgi'; -sub_filter './forum' 'http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/server.conf b/nginx/opennet.bro.ygg/server.conf deleted file mode 100644 index 2ad3a57..0000000 --- a/nginx/opennet.bro.ygg/server.conf +++ /dev/null @@ -1,38 +0,0 @@ -# www-less -include /etc/yggbro/nginx/opennet.bro.ygg/servers/opennet.bro.ygg.conf; - -# www -include /etc/yggbro/nginx/opennet.bro.ygg/servers/www.opennet.bro.ygg.conf; - -# bsd -include /etc/yggbro/nginx/opennet.bro.ygg/servers/bsd.opennet.bro.ygg.conf; - -# cisco -include /etc/yggbro/nginx/opennet.bro.ygg/servers/cisco.opennet.bro.ygg.conf; - -# grab -include /etc/yggbro/nginx/opennet.bro.ygg/servers/grab.opennet.bro.ygg.conf; - -# linux -include /etc/yggbro/nginx/opennet.bro.ygg/servers/linux.opennet.bro.ygg.conf; - -# m -include /etc/yggbro/nginx/opennet.bro.ygg/servers/m.opennet.bro.ygg.conf; - -# mobile -include /etc/yggbro/nginx/opennet.bro.ygg/servers/mobile.opennet.bro.ygg.conf; - -# palm -include /etc/yggbro/nginx/opennet.bro.ygg/servers/palm.opennet.bro.ygg.conf; - -# security -include /etc/yggbro/nginx/opennet.bro.ygg/servers/security.opennet.bro.ygg.conf; - -# solaris -include /etc/yggbro/nginx/opennet.bro.ygg/servers/solaris.opennet.bro.ygg.conf; - -# web -include /etc/yggbro/nginx/opennet.bro.ygg/servers/web.opennet.bro.ygg.conf; - -# wiki -include /etc/yggbro/nginx/opennet.bro.ygg/servers/wiki.opennet.bro.ygg.conf; \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/bsd.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/bsd.opennet.bro.ygg.conf deleted file mode 100644 index 9d4778f..0000000 --- a/nginx/opennet.bro.ygg/servers/bsd.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name bsd.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://bsd.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://bsd.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://bsd.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://bsd.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://bsd.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://bsd.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/cisco.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/cisco.opennet.bro.ygg.conf deleted file mode 100644 index 6218124..0000000 --- a/nginx/opennet.bro.ygg/servers/cisco.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name cisco.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://cisco.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://cisco.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://cisco.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://cisco.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://cisco.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://cisco.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/grab.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/grab.opennet.bro.ygg.conf deleted file mode 100644 index 591cc98..0000000 --- a/nginx/opennet.bro.ygg/servers/grab.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name grab.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://grab.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://grab.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://grab.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://grab.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://grab.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://grab.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/linux.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/linux.opennet.bro.ygg.conf deleted file mode 100644 index c4eddfd..0000000 --- a/nginx/opennet.bro.ygg/servers/linux.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name linux.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://linux.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://linux.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://linux.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://linux.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://linux.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://linux.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/m.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/m.opennet.bro.ygg.conf deleted file mode 100644 index c53f3ed..0000000 --- a/nginx/opennet.bro.ygg/servers/m.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name m.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://m.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://m.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://m.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://m.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://m.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://m.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/mobile.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/mobile.opennet.bro.ygg.conf deleted file mode 100644 index 20579df..0000000 --- a/nginx/opennet.bro.ygg/servers/mobile.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name mobile.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://mobile.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://mobile.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://mobile.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://mobile.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://mobile.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://mobile.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/opennet.bro.ygg.conf deleted file mode 100644 index e3d5e9b..0000000 --- a/nginx/opennet.bro.ygg/servers/opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://opennet.bro.ygg/'; - sub_filter "url('/" "url('http://opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/palm.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/palm.opennet.bro.ygg.conf deleted file mode 100644 index bbbba7d..0000000 --- a/nginx/opennet.bro.ygg/servers/palm.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name palm.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://palm.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://palm.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://palm.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://palm.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://palm.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://palm.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/security.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/security.opennet.bro.ygg.conf deleted file mode 100644 index 7a71ce6..0000000 --- a/nginx/opennet.bro.ygg/servers/security.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name security.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://security.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://security.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://security.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://security.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://security.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://security.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/solaris.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/solaris.opennet.bro.ygg.conf deleted file mode 100644 index 68c267f..0000000 --- a/nginx/opennet.bro.ygg/servers/solaris.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name solaris.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://solaris.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://solaris.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://solaris.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://solaris.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://solaris.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://solaris.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/web.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/web.opennet.bro.ygg.conf deleted file mode 100644 index 57b2955..0000000 --- a/nginx/opennet.bro.ygg/servers/web.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name web.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://web.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://web.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://web.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://web.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://web.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://web.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/wiki.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/wiki.opennet.bro.ygg.conf deleted file mode 100644 index 4981c59..0000000 --- a/nginx/opennet.bro.ygg/servers/wiki.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name wiki.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://wiki.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://wiki.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://wiki.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://wiki.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://wiki.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://wiki.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/www.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/www.opennet.bro.ygg.conf deleted file mode 100644 index f27633b..0000000 --- a/nginx/opennet.bro.ygg/servers/www.opennet.bro.ygg.conf +++ /dev/null @@ -1,29 +0,0 @@ -server { - - # .ygg supports yggdrasil addresses only - listen [::]:80; - - allow 0200::/7; - deny all; - - server_name www.opennet.bro.ygg; - - # Include handles (do not delete) - include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; - - location / { - - # Domain source - proxy_pass https://www.opennet.ru/; - - # Include common location rules - include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; - - # Relative paths - sub_filter 'action="/' 'action="http://www.opennet.bro.ygg/'; - sub_filter 'href="/' 'href="http://www.opennet.bro.ygg/'; - sub_filter 'src="/' 'src="http://www.opennet.bro.ygg/'; - sub_filter 'data-src="/' 'src="http://www.opennet.bro.ygg/'; - sub_filter "url('/" "url('http://www.opennet.bro.ygg/"; - } -} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/README.md b/nginx/opennet.ru/opennet.ru.bro.ygg/README.md new file mode 100644 index 0000000..d54d82a --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/README.md @@ -0,0 +1,36 @@ +# Nginx proxy configuration for OpenNet located at .opennet.ru.bro.ygg + +Current implementation forward subdomains to following locations: + +* `opennet.ru` > `opennet.ru.bro.ygg` +* `www.opennet.ru` > `www.opennet.ru.bro.ygg` +* `bsd.opennet.ru` > `bsd.opennet.ru.bro.ygg` +* `cisco.opennet.ru` > `cisco.opennet.ru.bro.ygg` +* `grab.opennet.ru` > `grab.opennet.ru.bro.ygg` +* `linux.opennet.ru` > `linux.opennet.ru.bro.ygg` +* `m.opennet.ru` > `m.opennet.ru.bro.ygg` +* `mobile.opennet.ru` > `mobile.opennet.ru.bro.ygg` +* `palm.opennet.ru` > `palm.opennet.ru.bro.ygg` +* `security.opennet.ru` > `security.opennet.ru.bro.ygg` +* `solaris.opennet.ru` > `solaris.opennet.ru.bro.ygg` +* `web.opennet.ru` > `web.opennet.ru.bro.ygg` +* `wiki.opennet.ru` > `wiki.opennet.ru.bro.ygg` +* `forum.opennet.ru` > `opennet.ru.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi` + +## Install + +* `ln -s /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/server.conf /etc/nginx/sites-enabled/yggbro.opennet.ru.opennet.ru.bro.ygg.conf` +* `nginx -t` +* `service nginx reload` + +## Uninstall + +* `rm /etc/nginx/sites-enabled/yggbro.opennet.ru.opennet.ru.bro.ygg.conf` +* `nginx -t` +* `service nginx reload` + +## Issues + +1. At this moment, config drops all JS some tabs could not work +2. Youtube embedded content still works +3. Redirect cases for some sub-domains require additional rules implementation \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/handles/redirect.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf similarity index 66% rename from nginx/opennet.bro.ygg/handles/redirect.conf rename to nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf index 1432673..03ea746 100644 --- a/nginx/opennet.bro.ygg/handles/redirect.conf +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf @@ -1,6 +1,6 @@ # Prevent out redirects (solution for issue #2) -location @yggbro_nginx_opennet_bro_ygg_handles_redirect { +location @yggbro_nginx_opennet_ru_opennet_ru_bro_ygg_handles_redirect { set $original_uri $uri; set $orig_loc $upstream_http_location; diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf new file mode 100644 index 0000000..442188c --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf @@ -0,0 +1,126 @@ +# Include configuration file +# Describes common rules for available 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_ru_opennet_ru_bro_ygg_handles_redirect; + +# Replace all matches +sub_filter_once off; + +# Enable multimedia replacement +sub_filter_types *; + +# Disable JS / trackers by default +sub_filter '' ' -->'; + +# Feedback link to project repository +sub_filter '' 'YGGbro'; + +# Links + +# . +sub_filter 'http://opennet.ru' 'http://opennet.ru.bro.ygg'; +sub_filter 'https://opennet.ru' 'http://opennet.ru.bro.ygg'; + +sub_filter 'http://opennet.me' 'http://opennet.ru.bro.ygg'; +sub_filter 'https://opennet.me' 'http://opennet.ru.bro.ygg'; + +# www +sub_filter 'http://www.opennet.ru' 'http://www.opennet.ru.bro.ygg'; +sub_filter 'https://www.opennet.ru' 'http://www.opennet.ru.bro.ygg'; + +sub_filter 'http://www.opennet.me' 'http://www.opennet.ru.bro.ygg'; +sub_filter 'https://www.opennet.me' 'http://www.opennet.ru.bro.ygg'; + +# m +sub_filter 'http://m.opennet.ru' 'http://m.opennet.ru.bro.ygg'; +sub_filter 'https://m.opennet.ru' 'http://m.opennet.ru.bro.ygg'; + +sub_filter 'http://m.opennet.me' 'http://m.opennet.ru.bro.ygg'; +sub_filter 'https://m.opennet.me' 'http://m.opennet.ru.bro.ygg'; + +# mobile +sub_filter 'http://mobile.opennet.ru' 'http://mobile.opennet.ru.bro.ygg'; +sub_filter 'https://mobile.opennet.ru' 'http://mobile.opennet.ru.bro.ygg'; + +sub_filter 'http://mobile.opennet.me' 'http://mobile.opennet.ru.bro.ygg'; +sub_filter 'https://mobile.opennet.me' 'http://mobile.opennet.ru.bro.ygg'; + +# wiki +sub_filter 'http://wiki.opennet.ru' 'http://wiki.opennet.ru.bro.ygg'; +sub_filter 'https://wiki.opennet.ru' 'http://wiki.opennet.ru.bro.ygg'; + +sub_filter 'http://wiki.opennet.me' 'http://wiki.opennet.ru.bro.ygg'; +sub_filter 'https://wiki.opennet.me' 'http://wiki.opennet.ru.bro.ygg'; + +# solaris +sub_filter 'http://solaris.opennet.ru' 'http://solaris.opennet.ru.bro.ygg'; +sub_filter 'https://solaris.opennet.ru' 'http://solaris.opennet.ru.bro.ygg'; + +sub_filter 'http://solaris.opennet.me' 'http://solaris.opennet.ru.bro.ygg'; +sub_filter 'https://solaris.opennet.me' 'http://solaris.opennet.ru.bro.ygg'; + +# bsd +sub_filter 'http://bsd.opennet.ru' 'http://bsd.opennet.ru.bro.ygg'; +sub_filter 'https://bsd.opennet.ru' 'http://bsd.opennet.ru.bro.ygg'; + +sub_filter 'http://bsd.opennet.me' 'http://bsd.opennet.ru.bro.ygg'; +sub_filter 'https://bsd.opennet.me' 'http://bsd.opennet.ru.bro.ygg'; + +# cisco +sub_filter 'http://cisco.opennet.ru' 'http://cisco.opennet.ru.bro.ygg'; +sub_filter 'https://cisco.opennet.ru' 'http://cisco.opennet.ru.bro.ygg'; + +sub_filter 'http://cisco.opennet.me' 'http://cisco.opennet.ru.bro.ygg'; +sub_filter 'https://cisco.opennet.me' 'http://cisco.opennet.ru.bro.ygg'; + +# linux +sub_filter 'http://linux.opennet.ru' 'http://linux.opennet.ru.bro.ygg'; +sub_filter 'https://linux.opennet.ru' 'http://linux.opennet.ru.bro.ygg'; + +sub_filter 'http://linux.opennet.me' 'http://linux.opennet.ru.bro.ygg'; +sub_filter 'https://linux.opennet.me' 'http://linux.opennet.ru.bro.ygg'; + +# web +sub_filter 'http://web.opennet.ru' 'http://web.opennet.ru.bro.ygg'; +sub_filter 'https://web.opennet.ru' 'http://web.opennet.ru.bro.ygg'; + +sub_filter 'http://web.opennet.me' 'http://web.opennet.ru.bro.ygg'; +sub_filter 'https://web.opennet.me' 'http://web.opennet.ru.bro.ygg'; + +# security +sub_filter 'http://security.opennet.ru' 'http://security.opennet.ru.bro.ygg'; +sub_filter 'https://security.opennet.ru' 'http://security.opennet.ru.bro.ygg'; + +sub_filter 'http://security.opennet.me' 'http://security.opennet.ru.bro.ygg'; +sub_filter 'https://security.opennet.me' 'http://security.opennet.ru.bro.ygg'; + +# palm +sub_filter 'http://palm.opennet.ru' 'http://palm.opennet.ru.bro.ygg'; +sub_filter 'https://palm.opennet.ru' 'http://palm.opennet.ru.bro.ygg'; + +sub_filter 'http://palm.opennet.me' 'http://palm.opennet.ru.bro.ygg'; +sub_filter 'https://palm.opennet.me' 'http://palm.opennet.ru.bro.ygg'; + +# grab +sub_filter 'http://grab.opennet.ru' 'http://grab.opennet.ru.bro.ygg'; +sub_filter 'https://grab.opennet.ru' 'http://grab.opennet.ru.bro.ygg'; + +sub_filter 'http://grab.opennet.me' 'http://grab.opennet.ru.bro.ygg'; +sub_filter 'https://grab.opennet.me' 'http://grab.opennet.ru.bro.ygg'; + +# forum +sub_filter 'http://forum.opennet.ru' 'http://opennet.ru.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; +sub_filter 'https://forum.opennet.ru' 'http://opennet.ru.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; + +sub_filter 'http://forum.opennet.me' 'http://opennet.ru.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; +sub_filter 'https://forum.opennet.me' 'http://opennet.ru.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; + +sub_filter '/forum' '/cgi-bin/openforum/vsluhboard.cgi'; +sub_filter './forum' 'http://opennet.ru.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/server.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/server.conf new file mode 100644 index 0000000..8cee698 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/server.conf @@ -0,0 +1,38 @@ +# www-less +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/opennet.ru.bro.ygg.conf; + +# www +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/www.opennet.ru.bro.ygg.conf; + +# bsd +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/bsd.opennet.ru.bro.ygg.conf; + +# cisco +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/cisco.opennet.ru.bro.ygg.conf; + +# grab +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/grab.opennet.ru.bro.ygg.conf; + +# linux +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/linux.opennet.ru.bro.ygg.conf; + +# m +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/m.opennet.ru.bro.ygg.conf; + +# mobile +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/mobile.opennet.ru.bro.ygg.conf; + +# palm +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/palm.opennet.ru.bro.ygg.conf; + +# security +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/security.opennet.ru.bro.ygg.conf; + +# solaris +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/solaris.opennet.ru.bro.ygg.conf; + +# web +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/web.opennet.ru.bro.ygg.conf; + +# wiki +include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/servers/wiki.opennet.ru.bro.ygg.conf; \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/bsd.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/bsd.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..cde6fc2 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/bsd.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name bsd.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://bsd.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://bsd.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://bsd.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://bsd.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://bsd.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://bsd.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/cisco.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/cisco.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..6b06799 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/cisco.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name cisco.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://cisco.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://cisco.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://cisco.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://cisco.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://cisco.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://cisco.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/grab.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/grab.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..f831061 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/grab.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name grab.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://grab.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://grab.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://grab.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://grab.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://grab.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://grab.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/linux.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/linux.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..198f9f5 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/linux.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name linux.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://linux.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://linux.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://linux.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://linux.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://linux.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://linux.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/m.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/m.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..0fcdab6 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/m.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name m.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://m.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://m.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://m.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://m.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://m.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://m.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/mobile.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/mobile.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..2d2fd95 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/mobile.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name mobile.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://mobile.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://mobile.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://mobile.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://mobile.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://mobile.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://mobile.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..aae413a --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/palm.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/palm.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..98692c1 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/palm.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name palm.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://palm.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://palm.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://palm.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://palm.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://palm.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://palm.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/security.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/security.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..c7b1d19 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/security.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name security.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://security.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://security.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://security.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://security.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://security.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://security.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/solaris.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/solaris.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..0b3d6b1 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/solaris.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name solaris.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://solaris.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://solaris.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://solaris.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://solaris.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://solaris.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://solaris.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/web.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/web.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..8bd870d --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/web.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name web.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://web.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://web.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://web.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://web.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://web.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://web.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/wiki.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/wiki.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..5a64d19 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/wiki.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name wiki.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://wiki.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://wiki.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://wiki.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://wiki.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://wiki.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://wiki.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/opennet.ru.bro.ygg/servers/www.opennet.ru.bro.ygg.conf b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/www.opennet.ru.bro.ygg.conf new file mode 100644 index 0000000..82a2ec0 --- /dev/null +++ b/nginx/opennet.ru/opennet.ru.bro.ygg/servers/www.opennet.ru.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name www.opennet.ru.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://www.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.ru/opennet.ru.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://www.opennet.ru.bro.ygg/'; + sub_filter 'href="/' 'href="http://www.opennet.ru.bro.ygg/'; + sub_filter 'src="/' 'src="http://www.opennet.ru.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://www.opennet.ru.bro.ygg/'; + sub_filter "url('/" "url('http://www.opennet.ru.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.ru/yggbro/opennet.ru/README.md b/nginx/opennet.ru/yggbro/opennet.ru/README.md new file mode 100644 index 0000000..dc911a0 --- /dev/null +++ b/nginx/opennet.ru/yggbro/opennet.ru/README.md @@ -0,0 +1,36 @@ +# Nginx proxy configuration for OpenNet located at subfolder + +Current implementation forward subdomains to following proxy locations: + +* `opennet.ru` > `/opennet.ru` +* `www.opennet.ru` > `/opennet.ru/www` +* `bsd.opennet.ru` > `/opennet.ru/bsd` +* `cisco.opennet.ru` > `/opennet.ru/cisco` +* `grab.opennet.ru` > `/opennet.ru/grab` +* `linux.opennet.ru` > `/opennet.ru/linux` +* `m.opennet.ru` > `/opennet.ru/m` +* `mobile.opennet.ru` > `/opennet.ru/mobile` +* `palm.opennet.ru` > `/opennet.ru/palm` +* `security.opennet.ru` > `/opennet.ru/security` +* `solaris.opennet.ru` > `/opennet.ru/solaris` +* `web.opennet.ru` > `/opennet.ru/web` +* `wiki.opennet.ru` > `/opennet.ru/wiki` +* `forum.opennet.ru` > `/opennet.ru/wwwcgi-bin/openforum/vsluhboard.cgi` + +## Install + +* `ln -s /etc/yggbro/nginx/opennet.ru/yggbro/opennet.ru/server.conf /etc/nginx/sites-enabled/yggbro.opennet.ru.yggbro.opennet.ru.conf` +* `nginx -t` +* `service nginx reload` + +## Uninstall + +* `rm /etc/nginx/sites-enabled/yggbro.opennet.ru.yggbro.opennet.ru.conf` +* `nginx -t` +* `service nginx reload` + +## Issues + +1. At this moment, config drops all JS some tabs could not work +2. Youtube embedded content still works +3. Redirect cases for some sub-domains require additional rules implementation \ No newline at end of file diff --git a/nginx/yggbro/opennet/handles/redirect.conf b/nginx/opennet.ru/yggbro/opennet.ru/handles/redirect.conf similarity index 66% rename from nginx/yggbro/opennet/handles/redirect.conf rename to nginx/opennet.ru/yggbro/opennet.ru/handles/redirect.conf index 42f25fc..551d15f 100644 --- a/nginx/yggbro/opennet/handles/redirect.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/handles/redirect.conf @@ -1,6 +1,6 @@ # Prevent out redirects (solution for issue #2) -location @yggbro_nginx_yggbro_opennet_handles_redirect { +location @yggbro_nginx_opennet_ru_yggbro_opennet_ru_handles_redirect { set $original_uri $uri; set $orig_loc $upstream_http_location; diff --git a/nginx/opennet.ru/yggbro/opennet.ru/locations.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations.conf new file mode 100644 index 0000000..f5886e9 --- /dev/null +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations.conf @@ -0,0 +1,38 @@ +# www-less +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/www-less.conf; + +# www +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/www.conf; + +# bsd +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/bsd.conf; + +# cisco +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/cisco.conf; + +# grab +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/grab.conf; + +# linux +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/linux.conf; + +# m +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/m.conf; + +# mobile +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/mobile.conf; + +# palm +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/palm.conf; + +# security +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/security.conf; + +# solaris +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/solaris.conf; + +# web +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/web.conf; + +# wiki +include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/locations/wiki.conf; \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/bsd.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/bsd.conf similarity index 68% rename from nginx/yggbro/opennet/locations/bsd.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/bsd.conf index c3c1c6f..0599661 100644 --- a/nginx/yggbro/opennet/locations/bsd.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/bsd.conf @@ -1,15 +1,15 @@ -location /opennet/bsd { +location /opennet.ru/bsd { # Domain source proxy_pass https://bsd.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/bsd/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/bsd/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/bsd/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/bsd/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/bsd/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/cisco.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/cisco.conf similarity index 67% rename from nginx/yggbro/opennet/locations/cisco.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/cisco.conf index 757e450..851fe5a 100644 --- a/nginx/yggbro/opennet/locations/cisco.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/cisco.conf @@ -1,15 +1,15 @@ -location /opennet/cisco { +location /opennet.ru/cisco { # Domain source proxy_pass https://cisco.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/cisco/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/cisco/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/cisco/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/cisco/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/cisco/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/grab.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/grab.conf similarity index 68% rename from nginx/yggbro/opennet/locations/grab.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/grab.conf index f7e27fe..2dc4817 100644 --- a/nginx/yggbro/opennet/locations/grab.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/grab.conf @@ -1,15 +1,15 @@ -location /opennet/grab { +location /opennet.ru/grab { # Domain source proxy_pass https://grab.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/grab/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/grab/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/grab/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/grab/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/grab/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/include/common.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/include/common.conf similarity index 73% rename from nginx/yggbro/opennet/locations/include/common.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/include/common.conf index 6476579..d2e473f 100644 --- a/nginx/yggbro/opennet/locations/include/common.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/include/common.conf @@ -1,6 +1,6 @@ # Include configuration file # Describes common rules for available locations at -# nginx/opennet/locations +# nginx/opennet.ru/locations # Tell to server, that's proxy request proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -8,7 +8,7 @@ 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; +error_page 301 302 307 = @yggbro_nginx_opennet_ru_yggbro_opennet_ru_handles_redirect; # Replace all matches sub_filter_once off; @@ -21,107 +21,107 @@ sub_filter '' ' -->'; # Feedback link to project repository -sub_filter '' 'YGGbro'; +sub_filter '' 'YGGbro'; # 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.ru' 'http://[$server_addr]/yggbro/opennet.ru'; +sub_filter 'https://opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru'; -sub_filter 'http://opennet.me' 'http://[$server_addr]/yggbro/opennet'; -sub_filter 'https://opennet.me' 'http://[$server_addr]/yggbro/opennet'; +sub_filter 'http://opennet.me' 'http://[$server_addr]/yggbro/opennet.ru'; +sub_filter 'https://opennet.me' 'http://[$server_addr]/yggbro/opennet.ru'; # 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.ru' 'http://[$server_addr]/yggbro/opennet.ru/www'; +sub_filter 'https://www.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://www.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/www'; +sub_filter 'https://www.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/m'; +sub_filter 'https://m.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://m.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/m'; +sub_filter 'https://m.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/mobile'; +sub_filter 'https://mobile.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://mobile.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/mobile'; +sub_filter 'https://mobile.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/wiki'; +sub_filter 'https://wiki.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://wiki.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/wiki'; +sub_filter 'https://wiki.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/solaris'; +sub_filter 'https://solaris.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://solaris.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/solaris'; +sub_filter 'https://solaris.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/bsd'; +sub_filter 'https://bsd.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://bsd.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/bsd'; +sub_filter 'https://bsd.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/cisco'; +sub_filter 'https://cisco.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://cisco.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/cisco'; +sub_filter 'https://cisco.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/linux'; +sub_filter 'https://linux.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://linux.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/linux'; +sub_filter 'https://linux.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/web'; +sub_filter 'https://web.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://web.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/web'; +sub_filter 'https://web.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/security'; +sub_filter 'https://security.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://security.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/security'; +sub_filter 'https://security.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/palm'; +sub_filter 'https://palm.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://palm.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/palm'; +sub_filter 'https://palm.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/grab'; +sub_filter 'https://grab.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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'; +sub_filter 'http://grab.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/grab'; +sub_filter 'https://grab.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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.ru' 'http://[$server_addr]/yggbro/opennet.ru/wwwcgi-bin/openforum/vsluhboard.cgi'; +sub_filter 'https://forum.opennet.ru' 'http://[$server_addr]/yggbro/opennet.ru/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 'http://forum.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/wwwcgi-bin/openforum/vsluhboard.cgi'; +sub_filter 'https://forum.opennet.me' 'http://[$server_addr]/yggbro/opennet.ru/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'; \ No newline at end of file +sub_filter './forum' 'http://[$server_addr]/yggbro/opennet.ru/wwwcgi-bin/openforum/vsluhboard.cgi'; \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/linux.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/linux.conf similarity index 67% rename from nginx/yggbro/opennet/locations/linux.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/linux.conf index df470d5..6215c69 100644 --- a/nginx/yggbro/opennet/locations/linux.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/linux.conf @@ -1,15 +1,15 @@ -location /opennet/linux { +location /opennet.ru/linux { # Domain source proxy_pass https://linux.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/linux/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/linux/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/linux/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/linux/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/linux/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/m.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/m.conf similarity index 70% rename from nginx/yggbro/opennet/locations/m.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/m.conf index caa5f28..bb13510 100644 --- a/nginx/yggbro/opennet/locations/m.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/m.conf @@ -1,15 +1,15 @@ -location /opennet/m { +location /opennet.ru/m { # Domain source proxy_pass https://m.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/m/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/m/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/m/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/m/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/m/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/mobile.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/mobile.conf similarity index 67% rename from nginx/yggbro/opennet/locations/mobile.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/mobile.conf index bc1de88..d39dfa9 100644 --- a/nginx/yggbro/opennet/locations/mobile.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/mobile.conf @@ -1,15 +1,15 @@ -location /opennet/mobile { +location /opennet.ru/mobile { # Domain source proxy_pass https://mobile.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/mobile/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/mobile/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/mobile/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/mobile/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/mobile/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/palm.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/palm.conf similarity index 68% rename from nginx/yggbro/opennet/locations/palm.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/palm.conf index 85c6834..726d617 100644 --- a/nginx/yggbro/opennet/locations/palm.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/palm.conf @@ -1,15 +1,15 @@ -location /opennet/palm { +location /opennet.ru/palm { # Domain source proxy_pass https://palm.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/palm/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/palm/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/palm/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/palm/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/palm/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/security.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/security.conf similarity index 65% rename from nginx/yggbro/opennet/locations/security.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/security.conf index fcff688..10da299 100644 --- a/nginx/yggbro/opennet/locations/security.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/security.conf @@ -1,15 +1,15 @@ -location /opennet/security { +location /opennet.ru/security { # Domain source proxy_pass https://security.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/security/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/security/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/security/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/security/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/security/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/solaris.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/solaris.conf similarity index 66% rename from nginx/yggbro/opennet/locations/solaris.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/solaris.conf index 179eaa8..d214136 100644 --- a/nginx/yggbro/opennet/locations/solaris.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/solaris.conf @@ -1,15 +1,15 @@ -location /opennet/solaris { +location /opennet.ru/solaris { # Domain source proxy_pass https://solaris.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/solaris/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/solaris/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/solaris/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/solaris/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/solaris/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/web.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/web.conf similarity index 68% rename from nginx/yggbro/opennet/locations/web.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/web.conf index 01a7f0b..9a181e8 100644 --- a/nginx/yggbro/opennet/locations/web.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/web.conf @@ -1,15 +1,15 @@ -location /opennet/web { +location /opennet.ru/web { # Domain source proxy_pass https://web.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/web/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/web/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/web/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/web/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/web/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/wiki.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/wiki.conf similarity index 68% rename from nginx/yggbro/opennet/locations/wiki.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/wiki.conf index af257ba..bfeab52 100644 --- a/nginx/yggbro/opennet/locations/wiki.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/wiki.conf @@ -1,15 +1,15 @@ -location /opennet/wiki { +location /opennet.ru/wiki { # Domain source proxy_pass https://wiki.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/wiki/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/wiki/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/wiki/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/wiki/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/wiki/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/www-less.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/www-less.conf similarity index 74% rename from nginx/yggbro/opennet/locations/www-less.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/www-less.conf index 76c7052..f869394 100644 --- a/nginx/yggbro/opennet/locations/www-less.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/www-less.conf @@ -4,12 +4,12 @@ location /opennet { proxy_pass https://opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/opennet/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations/www.conf b/nginx/opennet.ru/yggbro/opennet.ru/locations/www.conf similarity index 68% rename from nginx/yggbro/opennet/locations/www.conf rename to nginx/opennet.ru/yggbro/opennet.ru/locations/www.conf index 3699407..e33de26 100644 --- a/nginx/yggbro/opennet/locations/www.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/locations/www.conf @@ -1,15 +1,15 @@ -location /opennet/www { +location /opennet.ru/www { # Domain source proxy_pass https://www.opennet.ru/; # Include common rules - include /etc/yggbro/nginx/yggbro/opennet/locations/include/common.conf; + include /etc/yggbro/nginx/yggbro/opennet.ru/yggbro/opennet.ru/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/"; + sub_filter 'action="/' 'action="http://[$server_addr]/yggbro/opennet.ru/www/'; + sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/opennet.ru/www/'; + sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/www/'; + sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/opennet.ru/www/'; + sub_filter "url('/" "url('http://[$server_addr]/yggbro/opennet.ru/www/"; } \ No newline at end of file diff --git a/nginx/yggbro/opennet/server.conf b/nginx/opennet.ru/yggbro/opennet.ru/server.conf similarity index 53% rename from nginx/yggbro/opennet/server.conf rename to nginx/opennet.ru/yggbro/opennet.ru/server.conf index 0c2e208..33a988e 100644 --- a/nginx/yggbro/opennet/server.conf +++ b/nginx/opennet.ru/yggbro/opennet.ru/server.conf @@ -8,8 +8,8 @@ server { deny all; # Include handles - include /etc/yggbro/nginx/yggbro/opennet/handles/redirect.conf; + include /etc/yggbro/nginx/opennet.ru/yggbro/opennet.ru/handles/redirect.conf; # Include available locations - include /etc/yggbro/nginx/yggbro/opennet/locations.conf; + include /etc/yggbro/nginx/opennet.ru/yggbro/opennet.ru/locations.conf; } \ No newline at end of file diff --git a/nginx/texty.org.ua.bro.ygg/README.md b/nginx/texty.org.ua.bro.ygg/README.md deleted file mode 100644 index 71058d0..0000000 --- a/nginx/texty.org.ua.bro.ygg/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Nginx proxy configuration for texty.org.ua.bro.ygg - -Current implementation drops all JS and forward links to following locations: - -* `http://texty.org.ua` > `http://texty.org.ua.bro.ygg` - -## Install - -* `ln -s /etc/yggbro/nginx/texty.org.ua.bro.ygg/server.conf /etc/nginx/sites-enabled/yggbro.texty.org.ua.bro.ygg.conf` -* `nginx -t` -* `service nginx reload` - -## Uninstall - -* `rm /etc/nginx/sites-enabled/yggbro.texty.org.ua.bro.ygg.conf` -* `nginx -t` -* `service nginx reload` \ No newline at end of file diff --git a/nginx/texty.org.ua/texty.org.ua.bro.ygg/README.md b/nginx/texty.org.ua/texty.org.ua.bro.ygg/README.md new file mode 100644 index 0000000..c83c3f1 --- /dev/null +++ b/nginx/texty.org.ua/texty.org.ua.bro.ygg/README.md @@ -0,0 +1,17 @@ +# Nginx proxy configuration for texty.org.ua.bro.ygg + +Current implementation drops all JS and forward links to following locations: + +* `texty.org.ua` > `texty.org.ua.bro.ygg` + +## Install + +* `ln -s /etc/yggbro/nginx/texty.org.ua/texty.org.ua.bro.ygg/server.conf /etc/nginx/sites-enabled/yggbro.texty.org.ua.texty.org.ua.bro.ygg.conf` +* `nginx -t` +* `service nginx reload` + +## Uninstall + +* `rm /etc/nginx/sites-enabled/yggbro.texty.org.ua.texty.org.ua.bro.ygg.conf` +* `nginx -t` +* `service nginx reload` \ No newline at end of file diff --git a/nginx/texty.org.ua.bro.ygg/server.conf b/nginx/texty.org.ua/texty.org.ua.bro.ygg/server.conf similarity index 93% rename from nginx/texty.org.ua.bro.ygg/server.conf rename to nginx/texty.org.ua/texty.org.ua.bro.ygg/server.conf index 054d8bb..0e0ab21 100644 --- a/nginx/texty.org.ua.bro.ygg/server.conf +++ b/nginx/texty.org.ua/texty.org.ua.bro.ygg/server.conf @@ -33,6 +33,6 @@ server { sub_filter "url('/" "url('http://texty.org.ua.bro.ygg/"; # Feedback link to project repository - sub_filter '' 'YGGbro'; + sub_filter '' 'YGGbro'; } } diff --git a/nginx/texty.org.ua/yggbro/texty.org.ua/README.md b/nginx/texty.org.ua/yggbro/texty.org.ua/README.md new file mode 100644 index 0000000..89570aa --- /dev/null +++ b/nginx/texty.org.ua/yggbro/texty.org.ua/README.md @@ -0,0 +1,17 @@ +# Nginx proxy configuration for /yggbro/texty.org.ua subfolder location + +Current implementation drops all JS and forward links to following locations: + +* `texty.org.ua` > `/yggbro/texty.org.ua` + +## Install + +* `ln -s /etc/yggbro/nginx/texty.org.ua/yggbro/texty.org.ua/server.conf /etc/nginx/sites-enabled/yggbro.texty.org.ua.yggbro.texty.org.ua.conf` +* `nginx -t` +* `service nginx reload` + +## Uninstall + +* `rm /etc/nginx/sites-enabled/yggbro.texty.org.ua.yggbro.texty.org.ua.conf` +* `nginx -t` +* `service nginx reload` \ No newline at end of file diff --git a/nginx/yggbro/texty.org.ua/server.conf b/nginx/texty.org.ua/yggbro/texty.org.ua/server.conf similarity index 93% rename from nginx/yggbro/texty.org.ua/server.conf rename to nginx/texty.org.ua/yggbro/texty.org.ua/server.conf index c7fd177..524cca0 100644 --- a/nginx/yggbro/texty.org.ua/server.conf +++ b/nginx/texty.org.ua/yggbro/texty.org.ua/server.conf @@ -31,6 +31,6 @@ server { sub_filter "url('/" "url('http://[$server_addr]/yggbro/texty.org.ua/"; # Feedback link to project repository - sub_filter '' 'YGGbro'; + sub_filter '' 'YGGbro'; } } diff --git a/nginx/yggbro/README.md b/nginx/yggbro/README.md deleted file mode 100644 index 05e6857..0000000 --- a/nginx/yggbro/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Nginx proxy configuration for /yggbro subdirectory - -Follow subfolder instructions to enable. \ No newline at end of file diff --git a/nginx/yggbro/opennet/README.md b/nginx/yggbro/opennet/README.md deleted file mode 100644 index aecf57a..0000000 --- a/nginx/yggbro/opennet/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# Nginx proxy configuration for OpenNet located at subfolder - -Current implementation forward subdomains to following proxy locations: - -* `opennet.ru` > `/opennet` -* `www.opennet.ru` > `/opennet/www` -* `bsd.opennet.ru` > `/opennet/bsd` -* `cisco.opennet.ru` > `/opennet/cisco` -* `grab.opennet.ru` > `/opennet/grab` -* `linux.opennet.ru` > `/opennet/linux` -* `m.opennet.ru` > `/opennet/m` -* `mobile.opennet.ru` > `/opennet/mobile` -* `palm.opennet.ru` > `/opennet/palm` -* `security.opennet.ru` > `/opennet/security` -* `solaris.opennet.ru` > `/opennet/solaris` -* `web.opennet.ru` > `/opennet/web` -* `wiki.opennet.ru` > `/opennet/wiki` -* `forum.opennet.ru` > `/opennet/wwwcgi-bin/openforum/vsluhboard.cgi` - -## Install - -* `ln -s /etc/yggbro/nginx/yggbro/opennet/server.conf /etc/nginx/sites-enabled/yggbro.opennet.conf` -* `nginx -t` -* `service nginx reload` - -## Uninstall - -* `rm /etc/nginx/sites-enabled/yggbro.opennet.conf` -* `nginx -t` -* `service nginx reload` - -## Issues - -1. At this moment, config drops all JS some tabs could not work -2. Youtube embedded content still works -3. Redirect cases for some sub-domains require additional rules implementation \ No newline at end of file diff --git a/nginx/yggbro/opennet/locations.conf b/nginx/yggbro/opennet/locations.conf deleted file mode 100644 index 07d9e7e..0000000 --- a/nginx/yggbro/opennet/locations.conf +++ /dev/null @@ -1,38 +0,0 @@ -# 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; \ No newline at end of file diff --git a/nginx/yggbro/texty.org.ua/README.md b/nginx/yggbro/texty.org.ua/README.md deleted file mode 100644 index 7d385e2..0000000 --- a/nginx/yggbro/texty.org.ua/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Nginx proxy configuration for /yggbro/texty.org.ua - -Current implementation drops all JS and forward links to following locations: - -* `http://texty.org.ua` > `/yggbro/texty.org.ua` - -## Install - -* `ln -s /etc/yggbro/nginx/yggbro/texty.org.ua/server.conf /etc/nginx/sites-enabled/yggbro.texty.org.ua.conf` -* `nginx -t` -* `service nginx reload` - -## Uninstall - -* `rm /etc/nginx/sites-enabled/yggbro.texty.org.ua.conf` -* `nginx -t` -* `service nginx reload` \ No newline at end of file