Hi to all, i am asking here cause to now this problem take me a lot of hours... i had decide to use nginx only as a load balancer cause have 4 machines (for now only one host websites but next year hope they came all fully working) that running Apache 2.4 server on Windows os... the load balancer in is state is fully working but the problem came out when i decide to take SSL certificate for 4 of my sites... HTTP to HTTPS reply in ok but then came out the 502 bad gateway error... after a lot of tryes and modify think everything i take https://www.youtube.com on my code and even in this way the error came out so i am nearly sured that nginx is my problem... i post later my nginx conf code... thanks for any help...
server {
listen 80;
server_name www.mysite.it;
return 301 https://www.youtube.it;
#return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name www.mysite.it;
ssl_certificate D:\cert\www.mysite.it\cert1.pem;
ssl_certificate_key D:\cert\www.mysite.it\privkey1.pem;
location / {
proxy_set_header Host $http_host;
proxy_pass https://"server local IP":6001;
}
}