cleanups
This commit is contained in:
Binary file not shown.
@@ -38,7 +38,7 @@ server {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_pass http://127.0.0.1:8001;
|
||||
proxy_pass http://adphone_app;
|
||||
proxy_request_buffering off;
|
||||
client_body_timeout 120s;
|
||||
proxy_read_timeout 120s;
|
||||
|
||||
@@ -5,14 +5,16 @@ server {
|
||||
root $base;
|
||||
|
||||
# security
|
||||
# include config/security_wp.conf;
|
||||
# include config/security_wp.conf;
|
||||
|
||||
status_zone blog.linuxiarz.pl_backend;
|
||||
|
||||
#disable on varnish
|
||||
include config/wildcard.conf;
|
||||
include config/security.conf;
|
||||
include config/non-hotlink.conf;
|
||||
|
||||
port_in_redirect off;
|
||||
|
||||
# restrict methods
|
||||
if ($request_method !~ ^(GET|POST|HEAD|PUT|OPTIONS)$) {
|
||||
return '405';
|
||||
@@ -26,7 +28,6 @@ server {
|
||||
index index.php;
|
||||
|
||||
|
||||
|
||||
# index.php fallback
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
@@ -55,16 +56,16 @@ server {
|
||||
add_header Alt-Svc 'h3=":$server_port"; ma=86400';
|
||||
|
||||
server_name blog.linuxiarz.pl;
|
||||
|
||||
include config/wildcard.conf;
|
||||
|
||||
# logging
|
||||
access_log /var/log/angie/blog.linuxiarz.pl.access.log main;
|
||||
error_log /var/log/angie/blog.linuxiarz.pl.error.log warn;
|
||||
|
||||
status_zone blog.linuxiarz.pl_front;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:6081/;
|
||||
proxy_pass http://varnish;
|
||||
include config/proxy.conf;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,10 @@ server {
|
||||
access_log /var/log/angie/gitea.linuxiarz.pl.access.log;
|
||||
error_log /var/log/angie/gitea.linuxiarz.pl.error.log warn;
|
||||
|
||||
status_zone gitea.linuxiarz.pl;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000/;
|
||||
proxy_pass http://gitea;
|
||||
include config/proxy.conf;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,24 +6,17 @@ proxy_cache_path /var/cache/angie/redirector
|
||||
inactive=24h
|
||||
use_temp_path=off;
|
||||
|
||||
##############################
|
||||
# 1) Blok tylko do redirectów
|
||||
##############################
|
||||
|
||||
# HTTP -> HTTPS + normalizacja do www
|
||||
server {
|
||||
listen 80;
|
||||
server_name linuxiarz.pl www.linuxiarz.pl;
|
||||
|
||||
# Ścieżkowe redirecty z HTTP prosto do docelowych hostów
|
||||
rewrite ^/sk/?$ https://sk.linuxiarz.pl/ permanent;
|
||||
rewrite ^/feed/?$ https://blog.linuxiarz.pl/feed/ permanent;
|
||||
|
||||
# Reszta na HTTPS z www
|
||||
return 301 https://www.linuxiarz.pl$request_uri;
|
||||
}
|
||||
|
||||
# HTTPS non‑www -> www (tylko redirect)
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name linuxiarz.pl;
|
||||
@@ -31,14 +24,9 @@ server {
|
||||
include config/wildcard.conf;
|
||||
|
||||
ssl_protocols TLSv1.3 TLSv1.2;
|
||||
|
||||
# Bez Alt-Svc tutaj: ten blok tylko przekierowuje
|
||||
return 301 https://www.linuxiarz.pl$request_uri;
|
||||
}
|
||||
|
||||
#########################################
|
||||
# 2) Główny vhost treści: www + HTTP/3
|
||||
#########################################
|
||||
server {
|
||||
# TCP (HTTP/1.1 + HTTP/2)
|
||||
listen 443 ssl;
|
||||
@@ -62,7 +50,7 @@ server {
|
||||
access_log /var/log/angie/linuxiarz.pl.access.log main;
|
||||
error_log /var/log/angie/linuxiarz.pl.error.log warn;
|
||||
|
||||
status_zone www.linuxiarz.pl;
|
||||
status_zone www.linuxiarz.pl_frontend;
|
||||
# Dozwolone metody
|
||||
if ($request_method !~ ^(GET|HEAD|POST)$) {
|
||||
return 405;
|
||||
@@ -74,12 +62,10 @@ server {
|
||||
|
||||
# Główne proxy do Varnish na 6081
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:6081/;
|
||||
proxy_pass http://varnish/;
|
||||
include config/proxy.conf;
|
||||
}
|
||||
|
||||
# Przykład ads.txt (opcjonalnie):
|
||||
# location = /ads.txt { root /var/www/ads; }
|
||||
}
|
||||
|
||||
##################################
|
||||
@@ -92,6 +78,8 @@ server {
|
||||
# Domyślna ścieżka: pliki -> fallback do aplikacji na :8000
|
||||
error_page 404 = @redirect_check;
|
||||
|
||||
status_zone www.linuxiarz.pl_backend;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ @to8000;
|
||||
}
|
||||
@@ -102,7 +90,7 @@ server {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_pass http://linuxiarz_app;
|
||||
|
||||
proxy_request_buffering off;
|
||||
client_body_timeout 120s;
|
||||
@@ -119,7 +107,7 @@ server {
|
||||
set_real_ip_from 127.0.0.1;
|
||||
real_ip_header X-Forwarded-For;
|
||||
|
||||
proxy_pass http://127.0.0.1:8282;
|
||||
proxy_pass http://redirector_app;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@@ -130,7 +118,7 @@ server {
|
||||
location ~ ^/(stats|user-info|health)$ {
|
||||
add_header Cache-Control "no-cache, max-age=0, no-store";
|
||||
proxy_cache off;
|
||||
proxy_pass http://127.0.0.1:8282;
|
||||
proxy_pass http://redirector_app;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
Reference in New Issue
Block a user