mirror of
https://github.com/YGGverse/YGGbro.git
synced 2025-02-07 04:24:25 +00:00
refactor opennet conf
This commit is contained in:
parent
1872672f64
commit
b24b24a672
@ -1,4 +1,4 @@
|
||||
# Nginx proxy configuration for OpenNet
|
||||
# Nginx proxy configuration for OpenNet located at subfolder
|
||||
|
||||
Current implementation forward subdomains to following proxy locations:
|
||||
|
||||
@ -17,11 +17,17 @@ Current implementation forward subdomains to following proxy locations:
|
||||
* `wiki.opennet.ru` > `/opennet/wiki`
|
||||
* `forum.opennet.ru` > `/opennet/wwwcgi-bin/openforum/vsluhboard.cgi`
|
||||
|
||||
## Installation
|
||||
## Install
|
||||
|
||||
1. Download `nginx/opennet` content to `/etc/nginx/opennet` folder
|
||||
2. Copy `nginx/opennet/server.conf` to `/etc/nginx/sites-available/opennet.conf` then change commented options for your needs
|
||||
3. Alternatively, include `nginx/opennet/locations.conf` to existing website config at `sites-available` then reload nginx configuration
|
||||
* `ln -s /etc/yggbro/nginx/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,6 +1,6 @@
|
||||
# Prevent out redirects (solution for issue #2)
|
||||
|
||||
location @opennet_locations_handle_redirect {
|
||||
location @yggbro_nginx_opennet_handles_redirect {
|
||||
|
||||
set $original_uri $uri;
|
||||
set $orig_loc $upstream_http_location;
|
@ -1,41 +1,38 @@
|
||||
# www-less
|
||||
include /etc/nginx/opennet/locations/www-less.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/www-less.conf;
|
||||
|
||||
# www
|
||||
include /etc/nginx/opennet/locations/www.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/www.conf;
|
||||
|
||||
# bsd
|
||||
include /etc/nginx/opennet/locations/bsd.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/bsd.conf;
|
||||
|
||||
# cisco
|
||||
include /etc/nginx/opennet/locations/cisco.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/cisco.conf;
|
||||
|
||||
# grab
|
||||
include /etc/nginx/opennet/locations/grab.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/grab.conf;
|
||||
|
||||
# linux
|
||||
include /etc/nginx/opennet/locations/linux.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/linux.conf;
|
||||
|
||||
# m
|
||||
include /etc/nginx/opennet/locations/m.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/m.conf;
|
||||
|
||||
# mobile
|
||||
include /etc/nginx/opennet/locations/mobile.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/mobile.conf;
|
||||
|
||||
# palm
|
||||
include /etc/nginx/opennet/locations/palm.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/palm.conf;
|
||||
|
||||
# security
|
||||
include /etc/nginx/opennet/locations/security.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/security.conf;
|
||||
|
||||
# solaris
|
||||
include /etc/nginx/opennet/locations/solaris.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/solaris.conf;
|
||||
|
||||
# web
|
||||
include /etc/nginx/opennet/locations/web.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/web.conf;
|
||||
|
||||
# wiki
|
||||
include /etc/nginx/opennet/locations/wiki.conf;
|
||||
|
||||
# handles (do not delete)
|
||||
include /etc/nginx/opennet/locations/handle/redirect.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/wiki.conf;
|
@ -4,7 +4,7 @@ location /opennet/bsd {
|
||||
proxy_pass https://bsd.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/bsd/';
|
||||
|
@ -4,7 +4,7 @@ location /opennet/cisco {
|
||||
proxy_pass https://cisco.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/cisco/';
|
||||
|
@ -4,7 +4,7 @@ location /opennet/grab {
|
||||
proxy_pass https://grab.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/grab/';
|
||||
|
@ -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 = @opennet_locations_handle_redirect;
|
||||
error_page 301 302 307 = @yggbro_nginx_opennet_handles_redirect;
|
||||
|
||||
# Replace all matches
|
||||
sub_filter_once off;
|
||||
|
@ -4,7 +4,7 @@ location /opennet/linux {
|
||||
proxy_pass https://linux.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/linux/';
|
||||
|
@ -4,7 +4,7 @@ location /opennet/m {
|
||||
proxy_pass https://m.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/m/';
|
||||
|
@ -4,7 +4,7 @@ location /opennet/mobile {
|
||||
proxy_pass https://mobile.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/mobile/';
|
||||
|
@ -4,7 +4,7 @@ location /opennet/palm {
|
||||
proxy_pass https://palm.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/palm/';
|
||||
|
@ -4,7 +4,7 @@ location /opennet/security {
|
||||
proxy_pass https://security.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/security/';
|
||||
|
@ -4,7 +4,7 @@ location /opennet/solaris {
|
||||
proxy_pass https://solaris.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/solaris/';
|
||||
|
@ -4,7 +4,7 @@ location /opennet/web {
|
||||
proxy_pass https://web.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/web/';
|
||||
|
@ -4,7 +4,7 @@ location /opennet/wiki {
|
||||
proxy_pass https://wiki.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/wiki/';
|
||||
|
@ -4,7 +4,7 @@ location /opennet {
|
||||
proxy_pass https://opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/opennet/';
|
||||
|
@ -4,7 +4,7 @@ location /opennet/www {
|
||||
proxy_pass https://www.opennet.ru/;
|
||||
|
||||
# Include common rules
|
||||
include /etc/nginx/opennet/locations/include/common.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations/include/common.conf;
|
||||
|
||||
# Relative paths
|
||||
sub_filter 'action="/' 'action="http://[$server_addr]/opennet/www/';
|
||||
|
@ -1,12 +1,15 @@
|
||||
server {
|
||||
|
||||
# HTTP/IPv6 connections only
|
||||
# listen [::]:80 ipv6only=on _;
|
||||
listen [::]:80;
|
||||
|
||||
# Yggdrasil connections only
|
||||
# allow 0200::/7;
|
||||
# deny all;
|
||||
allow 0200::/7;
|
||||
deny all;
|
||||
|
||||
# Include handles
|
||||
include /etc/yggbro/nginx/opennet/handles/redirect.conf;
|
||||
|
||||
# Include available locations
|
||||
include /etc/nginx/opennet/locations.conf;
|
||||
include /etc/yggbro/nginx/opennet/locations.conf;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user