|
@@ -0,0 +1,194 @@
|
|
|
+# jibby.org
|
|
|
+server {
|
|
|
+ server_name jibby.org;
|
|
|
+
|
|
|
+ location / {
|
|
|
+
|
|
|
+ set $temp $request;
|
|
|
+ if ($temp ~ (.*)password=[^&]*(.*)) {
|
|
|
+ set $temp $1password=****$2;
|
|
|
+ }
|
|
|
+ access_log /var/log/nginx/access.log filter;
|
|
|
+
|
|
|
+ proxy_set_header Host jibby.org;
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ proxy_set_header X-Scheme $scheme;
|
|
|
+ proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
+ proxy_set_header X-Nginx-Scheme $scheme;
|
|
|
+ proxy_set_header X-Forwarded-Port $server_port;
|
|
|
+ proxy_redirect off;
|
|
|
+ proxy_pass http://localhost:8080;
|
|
|
+ }
|
|
|
+
|
|
|
+ # Used to try and trick matrix into routing jibby.org traffic to matrix
|
|
|
+ # location /_matrix {
|
|
|
+ # proxy_pass http://localhost:8008;
|
|
|
+ # proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
+ # }
|
|
|
+ #
|
|
|
+ location /.well-known/matrix/ {
|
|
|
+ root /var/www/;
|
|
|
+ default_type application/json;
|
|
|
+ add_header Access-Control-Allow-Origin *;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ listen 443 ssl; # managed by Certbot
|
|
|
+ ssl_certificate /etc/letsencrypt/live/jibby.org/fullchain.pem; # managed by Certbot
|
|
|
+ ssl_certificate_key /etc/letsencrypt/live/jibby.org/privkey.pem; # managed by Certbot
|
|
|
+ include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
|
+ ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+server {
|
|
|
+ if ($host = jibby.org) {
|
|
|
+ return 302 https://$host$request_uri;
|
|
|
+ } # managed by Certbot
|
|
|
+
|
|
|
+
|
|
|
+ server_name jibby.org;
|
|
|
+ listen 80;
|
|
|
+ return 404; # managed by Certbot
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+# *.jibby.org
|
|
|
+server {
|
|
|
+ server_name ~^(?<subdomain>.+)\.jibby\.org$;
|
|
|
+
|
|
|
+ location / {
|
|
|
+ set $temp $request;
|
|
|
+ if ($temp ~ (.*)password=[^&]*(.*)) {
|
|
|
+ set $temp $1password=****$2;
|
|
|
+ }
|
|
|
+ access_log /var/log/nginx/access.log filter;
|
|
|
+
|
|
|
+ proxy_set_header Host $subdomain.jibby.org;
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ proxy_set_header X-Scheme $scheme;
|
|
|
+ proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
+ proxy_set_header X-Nginx-Scheme $scheme;
|
|
|
+ proxy_set_header X-Forwarded-Port $server_port;
|
|
|
+ proxy_redirect off;
|
|
|
+ proxy_pass http://localhost:8080;
|
|
|
+ }
|
|
|
+
|
|
|
+ listen 443 ssl; # managed by Certbot
|
|
|
+ ssl_certificate /etc/letsencrypt/live/jibby.org-0001/fullchain.pem; # managed by Certbot
|
|
|
+ ssl_certificate_key /etc/letsencrypt/live/jibby.org-0001/privkey.pem; # managed by Certbot
|
|
|
+ include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
|
+ ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+server {
|
|
|
+
|
|
|
+ if ($host ~* (?<subdomain>.+)\.jibby\.org) {
|
|
|
+ return 302 https://$host$request_uri;
|
|
|
+ } # managed by Certbot
|
|
|
+
|
|
|
+
|
|
|
+ server_name ~^(?<subdomain>.+)\.jibby\.org$;
|
|
|
+ listen 80;
|
|
|
+ return 404; # managed by Certbot
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+# jossh.us
|
|
|
+# server {
|
|
|
+# server_name jossh.us;
|
|
|
+#
|
|
|
+# location / {
|
|
|
+# set $temp $request;
|
|
|
+# if ($temp ~ (.*)password=[^&]*(.*)) {
|
|
|
+# set $temp $1password=****$2;
|
|
|
+# }
|
|
|
+# access_log /var/log/nginx/access.log filter;
|
|
|
+#
|
|
|
+# proxy_set_header Host jossh.us;
|
|
|
+# proxy_set_header X-Real-IP $remote_addr;
|
|
|
+# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+# proxy_set_header X-Scheme $scheme;
|
|
|
+# proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
+# proxy_set_header X-Nginx-Scheme $scheme;
|
|
|
+# proxy_set_header X-Forwarded-Port $server_port;
|
|
|
+# proxy_redirect off;
|
|
|
+# proxy_pass http://localhost:8080;
|
|
|
+# }
|
|
|
+#
|
|
|
+#
|
|
|
+# listen 443 ssl; # managed by Certbot
|
|
|
+# ssl_certificate /etc/letsencrypt/live/jossh.us/fullchain.pem; # managed by Certbot
|
|
|
+# ssl_certificate_key /etc/letsencrypt/live/jossh.us/privkey.pem; # managed by Certbot
|
|
|
+# include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
|
+# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
|
+#
|
|
|
+#
|
|
|
+# }
|
|
|
+#
|
|
|
+# server {
|
|
|
+# if ($host = jossh.us) {
|
|
|
+# return 302 https://$host$request_uri;
|
|
|
+# } # managed by Certbot
|
|
|
+#
|
|
|
+#
|
|
|
+# server_name jossh.us;
|
|
|
+# listen 80;
|
|
|
+# return 404; # managed by Certbot
|
|
|
+#
|
|
|
+#
|
|
|
+# }
|
|
|
+#
|
|
|
+#
|
|
|
+# # *.jossh.us
|
|
|
+# server {
|
|
|
+# server_name ~^(?<subdomain>.+)\.jossh\.us$;
|
|
|
+#
|
|
|
+# location / {
|
|
|
+#
|
|
|
+# set $temp $request;
|
|
|
+# if ($temp ~ (.*)password=[^&]*(.*)) {
|
|
|
+# set $temp $1password=****$2;
|
|
|
+# }
|
|
|
+# access_log /var/log/nginx/access.log filter;
|
|
|
+#
|
|
|
+# proxy_set_header Host $subdomain.jossh.us;
|
|
|
+# proxy_set_header X-Real-IP $remote_addr;
|
|
|
+# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+# proxy_set_header X-Scheme $scheme;
|
|
|
+# proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
+# proxy_set_header X-Nginx-Scheme $scheme;
|
|
|
+# proxy_set_header X-Forwarded-Port $server_port;
|
|
|
+# proxy_redirect off;
|
|
|
+# proxy_pass http://localhost:8080;
|
|
|
+# }
|
|
|
+#
|
|
|
+# listen 443 ssl; # managed by Certbot
|
|
|
+# ssl_certificate /etc/letsencrypt/live/jossh.us-0001/fullchain.pem; # managed by Certbot
|
|
|
+# ssl_certificate_key /etc/letsencrypt/live/jossh.us-0001/privkey.pem; # managed by Certbot
|
|
|
+# include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
|
+# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
|
+#
|
|
|
+# }
|
|
|
+#
|
|
|
+# server {
|
|
|
+#
|
|
|
+# if ($host ~* (?<subdomain>.+)\.jossh\.us) {
|
|
|
+# return 302 https://$host$request_uri;
|
|
|
+# } # managed by Certbot
|
|
|
+#
|
|
|
+#
|
|
|
+# server_name ~^(?<subdomain>.+)\.jibby\.org$;
|
|
|
+# listen 80;
|
|
|
+# return 404; # managed by Certbot
|
|
|
+#
|
|
|
+#
|
|
|
+# }
|