trying to set up Nginx reverse proxy in front of AWS Elastic Load Balancer with TSL enabled on it.
The configuration I've tried:
events {}
http {
upstream pricing {
server pricing-api.my-awselb.com:443;
}
server {
listen 80;
server_name localhost;
location /pricing {
proxy_pass https://pricing;
}
}
}
Now when I run Nginx in docker locally on port 8080 when I try test it I get 404
> http http://localhost:8080/pricing
HTTP/1.1 404 Not Found
Connection: keep-alive
Content-Length: 0
Date: Wed, 21 Oct 2020 21:47:56 GMT
Server: nginx/1.19.3
upstream itself is accessible from my local machine:
> http https://pricing-api.my-awselb.com
HTTP/1.1 302 Found
Connection: keep-alive
Content-Length: 0
Date: Wed, 21 Oct 2020 21:54:36 GMT
Location: /swagger
Server: Kestrel
Whats wrong with my Nginx configuration?