update nginx configs

This commit is contained in:
Adrian Kuschelyagi Malacoda 2020-12-20 20:02:42 -06:00
parent a0f7e80abd
commit cf8d371f00
11 changed files with 139 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
nginx/snippets/restricted.conf

View File

@ -55,6 +55,9 @@ http {
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
# Request Limit
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
##
# Virtual Host Configs
##

View File

@ -0,0 +1,26 @@
server {
listen 80;
listen [::]:80;
server_name archives.glitchcity.info www.archives.glitchcity.info;
return 301 https://$host$request_uri;
}
server {
# SSL configuration
#
listen 443 ssl;
listen [::]:443 ssl;
server_name archives.glitchcity.info www.archives.glitchcity.info;
access_log /var/log/nginx/archives.glitchcity.info/access.log;
error_log /var/log/nginx/archives.glitchcity.info/error.log;
root /var/www/html/gclarchives;
index index.html;
charset UTF-8;
location / {
try_files $uri $uri/ =404;
}
}

View File

@ -0,0 +1,28 @@
server {
listen 80;
listen [::]:80;
server_name cadvisor.monarch-pass.net;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
client_max_body_size 100G;
server_name cadvisor.monarch-pass.net;
access_log /var/log/nginx/cadvisor.monarch-pass.net/access.log;
error_log /var/log/nginx/cadvisor.monarch-pass.net/error.log;
location /.well-known/ {
root /var/www/html/;
try_files $uri $uri/ =404;
}
location / {
include snippets/restricted.conf;
proxy_pass http://127.0.0.1:8010/;
}
}

View File

@ -57,7 +57,7 @@ server {
# include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
# fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
# fastcgi_pass unix:/run/php/php7.3-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
#}

View File

@ -21,7 +21,12 @@ server {
try_files $uri $uri/ =404;
}
location /free/ {
include snippets/restricted.conf;
}
location / {
# include snippets/restricted.conf;
proxy_pass http://127.0.0.1:8011/;
}
}

View File

@ -3,12 +3,18 @@ server {
listen [::]:80;
server_name forums.glitchcity.info glitchcity.info www.glitchcity.info;
return 301 https://$host$request_uri;
deny 220.243.135.0/24;
deny 220.243.136.0/24;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
deny 220.243.135.0/24;
deny 220.243.136.0/24;
server_name forums.glitchcity.info glitchcity.info www.glitchcity.info;
client_max_body_size 100M;

View File

@ -20,6 +20,11 @@ server {
index index.html;
autoindex on;
location /.well-known/ {
root /var/www/html/;
try_files $uri $uri/ =404;
}
location / {
try_files $uri $uri/ =404;
}

View File

@ -11,6 +11,10 @@ server {
server_name phpmyadmin.monarch-pass.net;
# include snippets/restricted.conf;
client_max_body_size 100G;
access_log /var/log/nginx/phpmyadmin.monarch-pass.net/access.log;
error_log /var/log/nginx/phpmyadmin.monarch-pass.net/error.log;

View File

@ -0,0 +1,28 @@
server {
listen 80;
listen [::]:80;
server_name prometheus.monarch-pass.net;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
client_max_body_size 100G;
server_name prometheus.monarch-pass.net;
access_log /var/log/nginx/prometheus.monarch-pass.net/access.log;
error_log /var/log/nginx/prometheus.monarch-pass.net/error.log;
location /.well-known/ {
root /var/www/html/;
try_files $uri $uri/ =404;
}
location / {
include snippets/restricted.conf;
proxy_pass http://127.0.0.1:8015/;
}
}

View File

@ -0,0 +1,32 @@
server {
listen 80;
listen [::]:80;
server_name video.monarch-pass.net;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
client_max_body_size 100G;
server_name video.monarch-pass.net;
access_log /var/log/nginx/video.monarch-pass.net/access.log;
error_log /var/log/nginx/video.monarch-pass.net/error.log;
location /.well-known/acme-challenge/ {
root /var/www/html/;
try_files $uri $uri/ =404;
}
location / {
proxy_pass http://127.0.0.1:8013/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Date $http_x_date;
proxy_set_header Date $http_date;
}
}