add s3.hantim.net proxy, fix dns ttl to 3600
Deploy nginx / deploy (push) Successful in 13s

This commit is contained in:
2026-03-19 18:23:39 -04:00
parent a421ecc837
commit da99d102e9
2 changed files with 34 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
# Garage S3 API
server {
listen 80;
listen [::]:80;
server_name s3.hantim.net;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://s3.hantim.net$request_uri;
}
}
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name s3.hantim.net;
ssl_certificate /etc/letsencrypt/live/s3.hantim.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/s3.hantim.net/privkey.pem;
add_header Strict-Transport-Security "max-age=63072000; preload" always;
client_max_body_size 100M;
location / {
proxy_pass http://garage:3900;
}
}
+2 -2
View File
@@ -159,7 +159,7 @@ HTTP_CODE=$(curl -s -o "$RESP" -w "%{http_code}" \
-X POST "$VULTR_API/domains/$APP/records" \
-H "$VULTR_AUTH" \
-H "Content-Type: application/json" \
-d "{\"name\": \"\", \"type\": \"A\", \"data\": \"$SERVER_IP\", \"ttl\": 300}")
-d "{\"name\": \"\", \"type\": \"A\", \"data\": \"$SERVER_IP\", \"ttl\": 3600}")
if [ "$HTTP_CODE" != "200" ] && [ "$HTTP_CODE" != "201" ] && [ "$HTTP_CODE" != "204" ]; then
echo "Error: Failed to create A record for $APP (HTTP $HTTP_CODE)"
cat "$RESP"
@@ -175,7 +175,7 @@ HTTP_CODE=$(curl -s -o "$RESP" -w "%{http_code}" \
-X POST "$VULTR_API/domains/$APP/records" \
-H "$VULTR_AUTH" \
-H "Content-Type: application/json" \
-d "{\"name\": \"www\", \"type\": \"A\", \"data\": \"$SERVER_IP\", \"ttl\": 300}")
-d "{\"name\": \"www\", \"type\": \"A\", \"data\": \"$SERVER_IP\", \"ttl\": 3600}")
if [ "$HTTP_CODE" != "200" ] && [ "$HTTP_CODE" != "201" ] && [ "$HTTP_CODE" != "204" ]; then
echo "Error: Failed to create A record for www.$APP (HTTP $HTTP_CODE)"
cat "$RESP"