At our institution we have single static public IP but multiple applications hosted for internet access. In an attempt to access application on different internal servers through a single server found reverse proxy can do this job.
The following is the current requirement:
In order to achieve this we have installed Apache and Nginx (Ubuntu 20) as illustrated here. But unfortunately the reverse proxy is not working as expected. Although no errors in the installation, the direction does not happen.
server {
listen 443 ssl;
server_name domaina.com;
ssl on;
ssl_certificate /etc/letsencrypt/live/domaina.com.cer;
ssl_certificate_key /etc/letsencrypt/live/domaina.com.key;
include /etc/letsencrypt/options-ssl-nginx.conf;
location / {
proxy_pass https://10.10.60.18/;
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;
}
}
server {
listen 443 ssl;
server_name domainb.com;
ssl on;
ssl_certificate /etc/letsencrypt/live/domainb.com.cer;
ssl_certificate_key /etc/letsencrypt/live/domainb.com.key;
include /etc/letsencrypt/options-ssl-nginx.conf;
location / {
proxy_pass https://10.10.60.30/;
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;
}
}
With the above settings this does not happen.
Not sure our approach is correct, is there any right approach to achieve this?