diff --git a/configs/fedi.conf b/configs/fedi.conf deleted file mode 100644 index bf9acdb..0000000 --- a/configs/fedi.conf +++ /dev/null @@ -1,14 +0,0 @@ -server { - listen 443 ssl; - server_name fedi.nhcarrigan.com; - ssl_certificate /etc/letsencrypt/live/fedi.nhcarrigan.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/fedi.nhcarrigan.com/privkey.pem; - - client_max_body_size 100M; - - location / { - proxy_set_header Host $host; - proxy_pass http://127.0.0.1:3000; - proxy_redirect off; - } -} diff --git a/configs/irc.conf b/configs/irc.conf deleted file mode 100644 index 0bd11f8..0000000 --- a/configs/irc.conf +++ /dev/null @@ -1,35 +0,0 @@ -server { - listen 443 ssl; - server_name irc.nhcarrigan.com; - ssl_certificate /etc/letsencrypt/live/irc.nhcarrigan.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/irc.nhcarrigan.com/privkey.pem; - - location / { - proxy_set_header Host $host; - proxy_pass http://127.0.0.1:9000; - proxy_redirect off; - } -} - -server { - listen 443 ssl; - server_name irc-admin.nhcarrigan.com; - ssl_certificate /etc/letsencrypt/live/irc-admin.nhcarrigan.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/irc-admin.nhcarrigan.com/privkey.pem; - - root /home/naomi/unrealircd-webpanel; - index index.php; - - location / { - try_files $uri $uri/ =404; - } - -location ~ \.php$ { - include snippets/fastcgi-php.conf; - fastcgi_pass unix:/run/php/php8.3-fpm.sock; - } - - location ~ /\.ht { - deny all; - } -} diff --git a/configs/matrix.conf b/configs/matrix.conf deleted file mode 100644 index bb3e125..0000000 --- a/configs/matrix.conf +++ /dev/null @@ -1,53 +0,0 @@ -server { - listen 443 ssl; - listen 8448 ssl default_server; - server_name matrix.nhcarrigan.com; - ssl_certificate /etc/letsencrypt/live/matrix.nhcarrigan.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/matrix.nhcarrigan.com/privkey.pem; - - # Root path redirect only for port 443 - location = / { - if ($server_port = 443) { - return 301 https://matrix.to/#/#home:matrix.nhcarrigan.com; - } - } - - location /.well-known/matrix/server { - return 200 '{"m.server": "matrix.nhcarrigan.com:443"}'; - add_header Content-Type application/json; - } - - location /.well-known/matrix/client { - return 200 '{"m.homeserver": {"base_url": "https://matrix.nhcarrigan.com"}}'; - add_header Content-Type application/json; - add_header "Access-Control-Allow-Origin" *; - add_header "Access-Control-Allow-Methods" "GET"; - } - - location ~ ^(/_synapse/admin) { - proxy_pass http://localhost:8008; - add_header Access-Control-Allow-Origin "https://matrix-admin.nhcarrigan.com" always; - proxy_hide_header Access-Control-Allow-Origin; - } - - location ~ ^(/_matrix|/_synapse/client) { - proxy_set_header Host $host:$server_port; - proxy_pass http://127.0.0.1:8008; - proxy_redirect off; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $remote_addr; - } -} - -server { - listen 443 ssl; - server_name matrix-admin.nhcarrigan.com; - ssl_certificate /etc/letsencrypt/live/matrix-admin.nhcarrigan.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/matrix-admin.nhcarrigan.com/privkey.pem; - - location / { - proxy_set_header Host $host; - proxy_pass http://localhost:5173; - proxy_redirect off; - } -} diff --git a/configs/prod.conf b/configs/prod.conf index 958db9a..e4b6666 100644 --- a/configs/prod.conf +++ b/configs/prod.conf @@ -119,10 +119,8 @@ server { ssl_certificate /etc/letsencrypt/live/chat.nhcarrigan.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/chat.nhcarrigan.com/privkey.pem; - root /home/nhcarrigan/chat; - location / { - index index.html; + return 301 https://forum.nhcarrigan.com; } } @@ -382,6 +380,23 @@ server { } } +server { + listen 443 ssl; + server_name music.nhcarrigan.com; + ssl_certificate /etc/letsencrypt/live/music.nhcarrigan.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/music.nhcarrigan.com/privkey.pem; + + root /home/nhcarrigan/music; + + location / { + index index.html; + } + + location /songs.json { + try_files /songs.json =404; + } +} + server { listen 443 ssl; server_name nails.nhcarrigan.com; @@ -419,10 +434,18 @@ server { ssl_certificate /etc/letsencrypt/live/naomi.lgbt/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/naomi.lgbt/privkey.pem; + root /home/nhcarrigan/portfolio/site; + location / { - proxy_set_header Host $host; - proxy_pass http://127.0.0.1:3000; - proxy_redirect off; + index index.html; + } + + location /games { + try_files /games.html =404; + } + + location /koikatsu { + try_files /koikatsu.html =404; } } @@ -445,10 +468,18 @@ server { ssl_certificate /etc/letsencrypt/live/nhcarrigan.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/nhcarrigan.com/privkey.pem; + root /home/nhcarrigan/portfolio/site; + location / { - proxy_set_header Host $host; - proxy_pass http://127.0.0.1:3000; - proxy_redirect off; + index index.html; + } + + location /games { + try_files /games.html =404; + } + + location /koikatsu { + try_files /koikatsu.html =404; } } @@ -636,10 +667,18 @@ server { ssl_certificate /etc/letsencrypt/live/www.naomi.lgbt/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/www.naomi.lgbt/privkey.pem; + root /home/nhcarrigan/portfolio/site; + location / { - proxy_set_header Host $host; - proxy_pass http://127.0.0.1:3000; - proxy_redirect off; + index index.html; + } + + location /games { + try_files /games.html =404; + } + + location /koikatsu { + try_files /koikatsu.html =404; } } @@ -649,9 +688,17 @@ server { ssl_certificate /etc/letsencrypt/live/www.nhcarrigan.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/www.nhcarrigan.com/privkey.pem; + root /home/nhcarrigan/portfolio/site; + location / { - proxy_set_header Host $host; - proxy_pass http://127.0.0.1:3000; - proxy_redirect off; + index index.html; + } + + location /games { + try_files /games.html =404; + } + + location /koikatsu { + try_files /koikatsu.html =404; } } diff --git a/pull.sh b/pull.sh index 68f3d1b..91cf904 100755 --- a/pull.sh +++ b/pull.sh @@ -1,4 +1,4 @@ -servers=("prod" "irc" "fedi" "matrix" "gitea") +servers=("prod" "gitea") for server in "${servers[@]}" do