- Add option to redirect www to non-www (REDIRECT_WWW). - Add endpoint to check nginx workers. - Custom virtual hosts (Server blocks) can be added by the user to create custom rules in `/opt/openvidu/custom-nginx-vhost`. - Parametrize `worker_connections` in nginx.conf (WORKER_CONNECTIONS) - Improve `discover_my_public_ip.sh` to use dns servers instead of http servers - Posibility to autodiscover ipv6 if available by using `PUBLIC_IP=auto-ipv6` in nginx, `TURN_PUBLIC_IP=auto-ipv6` in coturn and `COTURN_IP=auto-ipv6` in openvidu-server. By default ipv4 is used.
77 lines
1.5 KiB
Plaintext
77 lines
1.5 KiB
Plaintext
add_header X-Frame-Options SAMEORIGIN;
|
|
add_header X-Content-Type-Options nosniff;
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
|
|
{app_upstream}
|
|
|
|
upstream kibana {
|
|
server localhost:5601;
|
|
}
|
|
|
|
upstream openviduserver {
|
|
server localhost:5443;
|
|
}
|
|
|
|
{redirect_www_ssl}
|
|
|
|
server {
|
|
# Redirect to https
|
|
if ($host = {domain_name}) {
|
|
rewrite ^(.*) https://{domain_name}:{https_port}$1 permanent;
|
|
} # managed by Certbot
|
|
|
|
{redirect_www}
|
|
|
|
listen {http_port} default_server;
|
|
server_name {domain_name};
|
|
|
|
# letsencrypt
|
|
location /.well-known/acme-challenge {
|
|
root /var/www/certbot;
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
# Kibana panel
|
|
location /kibana {
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_set_header Host $host;
|
|
proxy_cache_bypass $http_upgrade;
|
|
|
|
rewrite ^/kibana/(.*)$ /$1 break;
|
|
proxy_pass http://kibana/;
|
|
}
|
|
|
|
{nginx_status}
|
|
}
|
|
|
|
server {
|
|
listen {https_port} ssl default deferred;
|
|
server_name {domain_name};
|
|
|
|
{ssl_config}
|
|
|
|
{proxy_config}
|
|
|
|
{app_config}
|
|
|
|
########################
|
|
# OpenVidu Locations #
|
|
########################
|
|
{common_api_pro}
|
|
|
|
{deprecated_api_pro}
|
|
|
|
{new_api_pro}
|
|
|
|
#################################
|
|
# LetsEncrypt #
|
|
#################################
|
|
|
|
location /.well-known/acme-challenge {
|
|
root /var/www/certbot;
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|