From 11d6781bd9e087d0c395481bb86036557ecaa585 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Wed, 21 Aug 2024 10:37:18 -0300 Subject: [PATCH] Arreglado faaso-prod para nombres.ralsina.me --- reverse_proxy/nginx.conf | 297 +++++++++++++++++++-------------------- 1 file changed, 147 insertions(+), 150 deletions(-) diff --git a/reverse_proxy/nginx.conf b/reverse_proxy/nginx.conf index a81c252..2385f38 100644 --- a/reverse_proxy/nginx.conf +++ b/reverse_proxy/nginx.conf @@ -1,189 +1,186 @@ -server { - listen 8080; - listen [::]:8080; - - server_name faaso-prod.ralsina.me; - - if ($request_method = 'OPTIONS' ) { - return 200; - } - - location / { - proxy_pass http://rocky.tail20c16.ts.net:8888; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header Host $host; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection upgrade; - proxy_set_header Accept-Encoding gzip; - } - error_page 500 502 503 504 /custom_50x.html; - location = /custom_50x.html { - root /usr/share/nginx/html; - internal; - } +map $upstream_http_access_control_allow_origin $allow_origin { + '' "*"; } + + server { - listen 8080; - listen [::]:8080; + listen 8080; + listen [::]:8080; - server_name code.ralsina.me; + server_name faaso-prod.ralsina.me; - location / { - proxy_pass http://mindy.tail20c16.ts.net:8088; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header Host $host; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection upgrade; - proxy_set_header Accept-Encoding gzip; - } - error_page 500 502 503 504 /custom_50x.html; - location = /custom_50x.html { - root /usr/share/nginx/html; - internal; - } -} -server { - listen 8080; - listen [::]:8080; + add_header 'Access-Control-Allow-Origin' $allow_origin; + add_header 'Access-Control-Allow-Headers' '*'; + add_header 'Access-Control-Allow-Credentials' 'true'; + add_header 'Allow' 'POST, GET, OPTIONS'; - server_name home.ralsina.me; - server_name ralsina.me; - server_name faaso.ralsina.me; - server_name nicolino.ralsina.me; - server_name crycco.ralsina.me; - server_name nombres.ralsina.me; + if ($request_method = 'OPTIONS' ) { + return 200; + } - location / { - proxy_pass http://pinky.tail20c16.ts.net:8080; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header Host $host; - } - error_page 500 502 503 504 /custom_50x.html; - location = /custom_50x.html { - root /usr/share/nginx/html; - internal; - } + location / { + proxy_pass http://rocky.tail20c16.ts.net:8888; + proxy_set_header X-Forwarded-Host $http_host; + } } server { - listen 8080; - listen [::]:8080; + listen 8080; + listen [::]:8080; - server_name links.ralsina.me; + server_name code.ralsina.me; - location / { - proxy_pass http://pinky.tail20c16.ts.net:8086; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header Host $host; - } - error_page 500 502 503 504 /custom_50x.html; - location = /custom_50x.html { - root /usr/share/nginx/html; - internal; - } + location / { + proxy_pass http://mindy.tail20c16.ts.net:8088; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header Host $host; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection upgrade; + proxy_set_header Accept-Encoding gzip; + } + error_page 500 502 503 504 /custom_50x.html; + location = /custom_50x.html { + root /usr/share/nginx/html; + internal; + } +} +server { + listen 8080; + listen [::]:8080; + + server_name home.ralsina.me; + server_name ralsina.me; + server_name faaso.ralsina.me; + server_name nicolino.ralsina.me; + server_name crycco.ralsina.me; + server_name nombres.ralsina.me; + + location / { + proxy_pass http://pinky.tail20c16.ts.net:8080; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header Host $host; + } + error_page 500 502 503 504 /custom_50x.html; + location = /custom_50x.html { + root /usr/share/nginx/html; + internal; + } } server { - listen 8080; - listen [::]:8080; + listen 8080; + listen [::]:8080; - server_name git.ralsina.me; + server_name links.ralsina.me; - location / { - proxy_pass http://pinky.tail20c16.ts.net:3000; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header Host $host; - } - error_page 403 404 500 502 503 504 /custom_50x.html; - location = /custom_50x.html { - root /usr/share/nginx/html; - internal; - } + location / { + proxy_pass http://pinky.tail20c16.ts.net:8086; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header Host $host; + } + error_page 500 502 503 504 /custom_50x.html; + location = /custom_50x.html { + root /usr/share/nginx/html; + internal; + } } server { - listen 8080; - listen [::]:8080; + listen 8080; + listen [::]:8080; - server_name gotify.ralsina.me; - - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Headers' '*'; - add_header 'Access-Control-Allow-Credentials' 'true'; - add_header 'Allow' 'POST, GET, OPTIONS'; + server_name git.ralsina.me; - if ($request_method = 'OPTIONS' ) { - return 200; - } - - location / { - proxy_pass http://pinky.tail20c16.ts.net:7777; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header Host $host; - } - - location /stream { - proxy_pass http://pinky.tail20c16.ts.net:7777; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - } - - error_page 403 404 500 502 503 504 /custom_50x.html; - location = /custom_50x.html { - root /usr/share/nginx/html; - internal; - } + location / { + proxy_pass http://pinky.tail20c16.ts.net:3000; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header Host $host; + } + error_page 403 404 500 502 503 504 /custom_50x.html; + location = /custom_50x.html { + root /usr/share/nginx/html; + internal; + } } server { - listen 8080; - listen [::]:8080; + listen 8080; + listen [::]:8080; - server_name faas.ralsina.me; + server_name gotify.ralsina.me; - add_header 'Access-Control-Allow-Origin' '*'; - add_header 'Access-Control-Allow-Headers' '*'; - add_header 'Access-Control-Allow-Credentials' 'true'; - add_header 'Allow' 'POST, GET, OPTIONS'; + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Headers' '*'; + add_header 'Access-Control-Allow-Credentials' 'true'; + add_header 'Allow' 'POST, GET, OPTIONS'; - if ($request_method = 'OPTIONS' ) { - return 200; - } + if ($request_method = 'OPTIONS' ) { + return 200; + } - location / { - proxy_pass http://pinky.tail20c16.ts.net:8082; - proxy_set_header X-Forwarded-Host $http_host; - } - error_page 403 404 500 502 503 504 /custom_50x.html; - location = /custom_50x.html { - root /usr/share/nginx/html; - internal; - } + location / { + proxy_pass http://pinky.tail20c16.ts.net:7777; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header Host $host; + } + + location /stream { + proxy_pass http://pinky.tail20c16.ts.net:7777; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + } + + error_page 403 404 500 502 503 504 /custom_50x.html; + location = /custom_50x.html { + root /usr/share/nginx/html; + internal; + } } server { - listen 8080; - listen [::]:8080; + listen 8080; + listen [::]:8080; - server_name snips.ralsina.me; + server_name faas.ralsina.me; - location / { - proxy_pass http://pinky.tail20c16.ts.net:8091 ; - proxy_set_header X-Forwarded-Host $http_host; + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Headers' '*'; + add_header 'Access-Control-Allow-Credentials' 'true'; + add_header 'Allow' 'POST, GET, OPTIONS'; - # WebSocket support - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } + if ($request_method = 'OPTIONS' ) { + return 200; + } + + location / { + proxy_pass http://pinky.tail20c16.ts.net:8082; + proxy_set_header X-Forwarded-Host $http_host; + } } server { - listen 8080; - listen [::]:8080; + listen 8080; + listen [::]:8080; - server_name covers.ralsina.me; - return 301 https://ralsina.me/stories/covers/; + server_name snips.ralsina.me; + + location / { + proxy_pass http://pinky.tail20c16.ts.net:8091 ; + proxy_set_header X-Forwarded-Host $http_host; + + # WebSocket support + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } +} + +server { + listen 8080; + listen [::]:8080; + + server_name covers.ralsina.me; + return 301 https://ralsina.me/stories/covers/; }