2021-06-07 10:58:42 +02:00
|
|
|
{xframe_options}
|
|
|
|
|
2020-11-02 19:46:59 +01:00
|
|
|
{app_upstream}
|
|
|
|
|
|
|
|
upstream openviduserver {
|
|
|
|
server localhost:5443;
|
|
|
|
}
|
|
|
|
|
2020-03-27 12:53:04 +01:00
|
|
|
server {
|
2020-04-28 15:53:56 +02:00
|
|
|
listen {http_port};
|
2020-11-25 12:07:33 +01:00
|
|
|
listen [::]:{http_port};
|
2020-03-27 12:53:04 +01:00
|
|
|
server_name {domain_name};
|
|
|
|
|
2020-04-09 16:33:26 +02:00
|
|
|
# Redirect to https
|
2020-03-27 12:53:04 +01:00
|
|
|
location / {
|
2020-04-28 15:53:56 +02:00
|
|
|
rewrite ^(.*) https://{domain_name}:{https_port}$1 permanent;
|
2020-03-27 12:53:04 +01:00
|
|
|
}
|
|
|
|
|
2020-04-09 16:33:26 +02:00
|
|
|
# letsencrypt
|
2020-03-27 12:53:04 +01:00
|
|
|
location /.well-known/acme-challenge/ {
|
|
|
|
root /var/www/certbot;
|
|
|
|
}
|
2020-11-02 19:46:59 +01:00
|
|
|
|
|
|
|
{nginx_status}
|
|
|
|
}
|
|
|
|
|
|
|
|
{redirect_www}
|
|
|
|
|
|
|
|
{redirect_www_ssl}
|
|
|
|
|
|
|
|
server {
|
|
|
|
listen {https_port} ssl;
|
2020-11-25 12:07:33 +01:00
|
|
|
listen [::]:{https_port} ssl;
|
2020-11-02 19:46:59 +01:00
|
|
|
server_name {domain_name};
|
|
|
|
|
|
|
|
{ssl_config}
|
|
|
|
|
|
|
|
{proxy_config}
|
|
|
|
|
|
|
|
{app_config}
|
|
|
|
|
|
|
|
########################
|
|
|
|
# OpenVidu Locations #
|
|
|
|
########################
|
|
|
|
{common_api_ce}
|
|
|
|
|
|
|
|
{deprecated_api_ce}
|
|
|
|
|
|
|
|
{new_api_ce}
|
|
|
|
|
|
|
|
#################################
|
|
|
|
# LetsEncrypt #
|
|
|
|
#################################
|
|
|
|
location /.well-known/acme-challenge {
|
|
|
|
root /var/www/certbot;
|
|
|
|
try_files $uri $uri/ =404;
|
|
|
|
}
|
2020-04-09 16:33:26 +02:00
|
|
|
}
|