Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29544

Nginx reverse proxy for domain.com:port

$
0
0

I have a web application running and publicly available on http://example.com:8099

To run the application over HTTPS, the app documentation suggests that we use a standard reverse proxy because it does not natively support HTTPS. All the guides I found is about proxying with just a domain root and does not take the port into consideration.

To begin with, I'm not sure which port should I even listen to in the first place. Is it 443, or 8099?

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name example.com;

    error_log         /var/log/nginx/sonar-error.log;
    access_log        /var/log/nginx/sonar-access.log;

    location / {
       proxy_pass http://localhost:8099;
    }
}

In my server (AWS EC2 instance), the application is also running at the same port http://localhost:8099 as in the domain.

I've tried different configurations and checked whether anything is logged in to these log files. But these were empty. So I don't think I'm doing it right.


Viewing all articles
Browse latest Browse all 29544

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>