'How to write settings in NGINX for ssl request
I have nginx server and it's works fine for http requests. But on https it's not working.
How to solve it? Where is problem?)
upstream coinbot {
server web:5000;
}
server {
listen 80;
location / {
proxy_pass http://coinbot;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
}
server {
listen 443 ssl;
server_name coinbot;
ssl_certificate /etc/nginx/ssl/coinbot.crt;
ssl_certificate_key /etc/nginx/ssl/coinbot.key;
location / {
proxy_pass https://coinbot;
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
