I'm on RHEL7.9 Linux. I have a server (IP a.b.c.d
) serving a webApplicationA and using https in nginx and it's working accessible at https://a.b.c.d
.
On that same machine (same IP, a.b.c.d
) I have an AppImage running which is a DIFFERENT web application, webApplicationB serving map tiles accessible at http://a.b.c.d:3650
.
WebApplicationA needs to load the map tiles from http://a.b.c.d:3650
, that is from webApplicationB.
The only way I'm currently able to get this to work (loading http://a.b.c.d:3650
inside webApplicationA) is by configuring Chrome to "Allow insecure content". This is not acceptable.
I'm not sure I'm able to access the innards of the AppImage to embed any SSL keys. How would I go about modifying the nginx.conf
for webApplicationA to proxy to http://a.b.c.d:3650
, such that the loaded map tiles from webApplicationB is using https? I've spent a week researching and trying various "/location
" parameters "rewrite
" lines in the nginx.conf
file with no luck. The more I research and try the more I feel I'm just trying anything and everything just hoping it magically works at this point. Can someone please explain how this is done?
Here's my existing server block. What would I add or change?
server {
listen 443 ssl;
server_name mapperapp;
rewrite /login / redirect;
ssl_certificate nginx.crt;
ssl_certificate_key nginx.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 60m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
}
}
UPDATE:
I added the following server block to my existing nginx.conf, and then navigated to https://a.b.c.d:4653
and it worked.
server {
listen 4653 ssl;
server_name mapperapp;
ssl_certificate nginx.crt;
ssl_certificate_key nginx.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 60m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_set_header X-Forwarded-Host mapperapp;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://a.b.c.d:3650;
}
}