problem with http headers when using ssl

karolis nginx-forum at
Tue Jul 17 13:26:12 UTC 2012

Hi everyone,

when i'm proxying to tomcat server everything is fine, proxy_pass works.
>From there i connect to some payment site, but if i decide to go back,
it brings me to to site:


but it should be ip adress not upstream name:

Here's part of my nginx.conf file:

http {
upstream www80  {
upstream www443  {

server {
      #server_name_in_redirect off;
      listen 443;
      ssl on;
      ssl_certificate      /home/dts/certificates/;
      ssl_ciphers          HIGH:!aNULL:!MD5:!kEDH;
      keepalive_timeout    70;

      location / {
        proxy_pass                   http://www80;
        proxy_redirect              default;
        proxy_set_header        X-Forwarded-Host        $host;
        proxy_set_header        X-Forwarded-Server      $host;
        proxy_set_header        X-Forwarded-For        
        proxy_set_header        X-Forwarded-Ssl         on;
        proxy_set_header        X-Forwarded-Proto       https;

Can anyone help me, please? Thanks in advance.


Posted at Nginx Forum:,228638,228638#msg-228638

More information about the nginx mailing list