Opened 7 years ago

Closed 7 years ago

#1453 closed enhancement (invalid)

nginx transform https to http when using try_files

Reported by: AI-PaaS@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.11.x
Keywords: Cc:
uname -a: Linux mvnoweb 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.11.13
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/data/nginx02/nginx --with-http_ssl_module
[nginx02@mvnoweb conf]$ timed out waiting for input: auto-logout
[webusr01@mvnoweb conf]$ ../sbin/nginx -V
nginx version: nginx/1.11.13
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
configure arguments: --prefix=/data/webusr01/nginx

Description

I have two nginx as reverse proxy, the first one is as load balance with ssl enabled. the second one is a static html server, which use try_files.

the second one:

location /cust {

root /data/webusr01/sa-cust-web;
index index.html index.htm;
try_files $uri $uri/ /cust/index.html;

}

and the location html is written by vuejs, which will trigger the try file directive, after try file, the htts will change to http access.

if i use proxy style, i can add " proxy_set_header X-Forwarded-Proto https;" , then tomcat or jetty can continue https access.

how i set with try_files with https continue?

Change History (1)

comment:1 by Maxim Dounin, 7 years ago

Resolution: invalid
Status: newclosed

The try_files directive doesn't change request scheme in any way. It may, however, lead to a different request processing, resulting in a redirect to http being returned somewhere. If you have questions on what and why happens in your setup, please consider using the support options available.

Note: See TracTickets for help on using tickets.