I want to deploy Janus behind a frontend via Nginx server, that would act as a reverse proxy for incoming requests.
I'm using Ubuntu 18.04 and installed Janus correctly by documentation. The folder my Janus is installed is /opt/janus/ ....
I configure my server the following way
Server {
root /home/vsst/janus-gateway/html;
index index.html index.htm index.nginx-debian.html;
server_name janus.simpletask.dev;
location /opt/ {
proxy_pass http://84.201.181.191:8088/;
}
location / {
try_files $uri $uri/ =404;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/janus.simpletask.dev/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/janus.simpletask.dev/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = janus.simpletask.dev) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name janus.simpletask.dev;
return 404; # managed by Certbot
}
84.201.181.191 Is the public ip of my machine
I've also changed my Janus.js file variable server to var server = "/opt/janus"
according to https://groups.google.com/forum/#!topic/meetecho-janus/dIv-4s0HOdw
But after all manipulations I still have the message API call failed: [object Object],while trying to start any of the demo on site. So I can't use any demos provided by Janus. Please help to figure out what I'm doing wrong. Thanks a lot!