Added new address config
This commit is contained in:
parent
608eb7b7ae
commit
8aa4c926f5
35
prv-api.nik4nao.xyz.conf
Normal file
35
prv-api.nik4nao.xyz.conf
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user