From 8aa4c926f5ee2ba1a6c80dcb685d8659a3aec5d2 Mon Sep 17 00:00:00 2001 From: Nik Afiq Date: Sun, 23 Nov 2025 22:27:29 +0900 Subject: [PATCH] Added new address config --- prv-api.nik4nao.xyz.conf | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 prv-api.nik4nao.xyz.conf diff --git a/prv-api.nik4nao.xyz.conf b/prv-api.nik4nao.xyz.conf new file mode 100644 index 0000000..139b8f8 --- /dev/null +++ b/prv-api.nik4nao.xyz.conf @@ -0,0 +1,35 @@ +# /etc/nginx/sites-available/prv-api.nik4nao.xyz + +map $http_x_api_key $api_key_ok { + default 0; + "YOUR_SUPER_SECRET_KEY_2025W47" 1; +} + +server { + listen 80; + server_name prv-api.nik4nao.xyz; + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl http2; + server_name prv-api.nik4nao.xyz; + + ssl_certificate /etc/letsencrypt/live/prv-api.nik4nao.xyz/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/prv-api.nik4nao.xyz/privkey.pem; + + ssl_protocols TLSv1.2 TLSv1.3; + ssl_prefer_server_ciphers on; + + if ($api_key_ok = 0) { + return 401; + } + + location /uma-tts/ { + proxy_pass http://192.168.7.96:18343/; + proxy_set_header Host $host; + 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 $scheme; + } +} \ No newline at end of file