Hi,
My goal: set up a secure wordpress site where one page has an iframe pointing to a nodejs server listening on port (http) 1880. On DigitalOcean Ubuntu 16.04.
I have had a (previous, working) setup where the (http) website was on another host - nodejs listening on (http) port 1880.
I have already successfully created a certificate for the website - ie. port 80/443.
The following nginx config file allows access (via port 1888) to the nodejs app listening on http port 1880:
server {
listen 1888 ;
server_name sandbox.ritc.io;
location / {
proxy_pass http://PRIVATE_IP_ADDRESS:1880;
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;
}
}
You can test that the nodejs app is accessible - at http://sandbox.ritc.io:1888
The iframe reference in the website is:
[iframe src=āhttp://sandbox.ritc.io:1888/?env=website#ā width=ā100%ā height=ā600ā][/iframe]
The problem is: Chrome +other browsers do not allow āmixed contentā.
So in order to be able to have the iframe refer to:
[iframe src=āhttps://sandbox.ritc.io:1888/?env=website#ā width=ā100%ā height=ā600ā][/iframe]
It seems that one solution would be that I could configure the nginx server block to accept ssl. ie. I (think I ) would need to create an ssl certificate allowing access to port 1888. In this scenario, nginx will accept https requests, while forwarding the request on the nodejs (still) listening via http - on port 1880. (via proxy_pass http://PRIVATE_IP_ADDRESS:1880;)
Is it possible to create a certificate to do this? If so, how do I do this?
Thanks
Colin Goldberg
My domain is:
sandbox.ritc.io
My web server is (include version):
nginx/1.10.3 (Ubuntu)
The operating system my web server runs on is (include version):
Ubuntu 16.04
My hosting provider, if applicable, is:
Digital Ocean
I can login to a root shell on my machine (yes or no, or I donāt know):
Yes
Iām using a control panel to manage my site (no, or provide the name and version of the control panel):
No