0

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: enter image description here

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?

user3792463
  • 101
  • 1

1 Answers1

0

Found a super-duper solution for this. Just download and install Nginx Proxy Manager from https://nginxproxymanager.com/ This can run as a docker therefore no need to install any dependency. This is all-in-one package. Just download and run. then open the application set 'proxy host' using very easy to use GUI. Complete guide is available here: https://nginxproxymanager.com/guide/#project-goal

user3792463
  • 101
  • 1