Hi All
I am new to nginx. I am trying forward proxy for my mail server that is https. when I m trying to login from home page, mail server redirects to another page that is also https but my nginx in http. I want redirected page should be http. Please help
Piece of code i am using is as
server
{
listen 8090;
server_name test;
location /{
proxy_pass https://192.168.x.x; #mail server IP
proxy_set_header Host $host:8090;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For https://$proxy_add_x_forwarded_for;
#rewrite ^(.*) http://$host$1:8090 permanent;
proxy_connect_timeout 150;
proxy_send_timeout 100;
proxy_read_timeout 100;
proxy_buffers 4 32k;
client_max_body_size 8m;
client_body_buffer_size 128k;
}
}
I am new to nginx. I am trying forward proxy for my mail server that is https. when I m trying to login from home page, mail server redirects to another page that is also https but my nginx in http. I want redirected page should be http. Please help
Piece of code i am using is as
server
{
listen 8090;
server_name test;
location /{
proxy_pass https://192.168.x.x; #mail server IP
proxy_set_header Host $host:8090;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For https://$proxy_add_x_forwarded_for;
#rewrite ^(.*) http://$host$1:8090 permanent;
proxy_connect_timeout 150;
proxy_send_timeout 100;
proxy_read_timeout 100;
proxy_buffers 4 32k;
client_max_body_size 8m;
client_body_buffer_size 128k;
}
}