Welcome! Log In Create A New Profile

Advanced

SSL location keep redirecting to non-SSL

Ian Evans
September 02, 2011 08:52PM
Ok...my brain's been hurting on this one tonight.

My site's been running fine on nginx for years. have SSL and non-SSL
locations. PHP runs through .shtml files

Working on a Facebook app and right now need to have it work with both
the SSL and non-SSL URL. Testing the coding on my server right now.

If I go to http://www.example.com/myappsname the page loads.
If I go to https://www.example.com/myappsname/index.shtml the page
loads. <-note https
If I go to https://www.example.com/myappsname/ the page redirects to
http://www.example.com/myappsname. <-note https on first URL

Here are the relevant locations in the SSL server section:

location / {
root /usr/local/apache/htdocs;
rewrite ^(.+) http://www.digitalhit.com$1 permanent;
index index.shtml index.php;
}

location ~ \.(shtml|php|inc)$ {
root /usr/local/apache/htdocs;
include /usr/local/nginx/conf/fastcgi-php.conf;
fastcgi_pass 127.0.0.1:10004;
}

location ^~ /myappsname/ {
index index.shtml
root /usr/local/apache/htdocs/;
fastcgi_intercept_errors on;
include /usr/local/nginx/conf/fastcgi-php.conf;
fastcgi_pass 127.0.0.1:10004;
fastcgi_param HTTPS on;
}

I'll probably smack my head when this is pointed out to me. All my other
SSL locations work fine. Any idea why including the filename stays SSL
but dropping it redirects?

Thanks.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

SSL location keep redirecting to non-SSL

Ian Evans September 02, 2011 08:52PM

Re: SSL location keep redirecting to non-SSL

Ian Evans September 03, 2011 04:18AM

Re: SSL location keep redirecting to non-SSL

Ian Evans September 03, 2011 05:22AM

Re: SSL location keep redirecting to non-SSL

Calin Don September 03, 2011 05:26AM

Re: SSL location keep redirecting to non-SSL

Ian Evans September 03, 2011 05:36AM

Re: SSL location keep redirecting to non-SSL

Ian Evans September 03, 2011 06:20AM

Re: SSL location keep redirecting to non-SSL

stefancaunter September 03, 2011 06:16AM

Re: SSL location keep redirecting to non-SSL

Ian Evans September 03, 2011 06:26AM

Re: SSL location keep redirecting to non-SSL

Ian Evans September 03, 2011 03:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 170
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready