some problems with http:// -> https:// & phpMyAdmin

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

some problems with http:// -> https:// & phpMyAdmin

Gregory Edigarov
server {
     listen 80;
     server_name site.com www.site.com;
     location / {
        return 301 https://site.com$request_uri;
     }
}

server {
     listen 443;
     server_name site.com;

     [certificate setup skipped]
# phpMyAdmin
     location /pma {     proxy_set_header Host $http_host;
       proxy_set_header X-REQUEST_URI $request_uri;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_pass <a href="http://127.0.0.1:8080;">http://127.0.0.1:8080;                     #Apache
listens here
       client_max_body_size 10m;
       client_body_buffer_size 128k;
       proxy_connect_timeout 90;
       proxy_send_timeout 90;
       proxy_read_timeout 90;
       proxy_buffer_size 32k;
       proxy_buffers 8 16k;
       proxy_busy_buffers_size 64k;
       proxy_temp_file_write_size 64k;
     }
   # other stuff skipped, as it works correctly

}

When I test this config using :
curl -vvvik
https://site.com/pma/index.php?token=a5255c4748a3ccbe87b566ba04cae84c -X
POST -d 'pma_username=user&pma_password=somepass'

among other things I get:
.... skip .....
Location:
https://site.com:80/pma/index.php?lang=en&token=25286554842f53e1bb0cfa4390caf154&phpMyAdmin=k6plh7hnvfg6aphfkqbg17p3or70474r

why do i get port 80 in location: and how can i eliminate it?

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: some problems with http:// -> https:// & phpMyAdmin

vedranf
It looks like the backend has not been told yet its running on 443.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,262860,262863#msg-262863

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx