28 lines
857 B
Nginx Configuration File
28 lines
857 B
Nginx Configuration File
# Optional nginx config: put this in /etc/nginx/sites-available/voice.kvmx.ru
|
|
# and symlink to sites-enabled. The phone accesses http://voice.kvmx.ru:9200/.
|
|
# Alternatively, mavweb can bind 10.42.0.1:9200 directly (no nginx needed).
|
|
#
|
|
# sudo ln -sf /etc/nginx/sites-available/voice.kvmx.ru /etc/nginx/sites-enabled/
|
|
# sudo nginx -t && sudo systemctl reload nginx
|
|
|
|
server {
|
|
listen 10.42.0.1:9200;
|
|
listen 192.168.1.104:9200;
|
|
server_name voice.kvmx.ru;
|
|
|
|
allow 10.42.0.0/24;
|
|
allow 192.168.1.0/24;
|
|
deny all;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:9201;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
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;
|
|
}
|
|
}
|