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?
still expermineting…just looked at the debug log. Even if I change the
location to location = /myfacebookapp a call to myfacebookapp still
isn’t matching the location.
Really don’t get what’s happening here. Why are my other ssl locations
working?
You should set a serverwide index directive. You should move index
index.shtml index.php; from location / {} to server {}
Also your rewrite rule rewrite ^(.+) http://www.example.com$1 permanent;
sould be rewritten into rewrite ^ http://www.example.com$request_uri?
permanent;
After doing so tested location = /myfacebookapp which redirected to
http, not what I want and location ~ /myfacebookapp which tossed a
404…also not what I want.
Just wondering…instead of a blanket redirect and then location that
try to overide it, would it be better to have a rewrite that says “if
not subdir1|subdir2|myfacebookapp rewrite to http”. Then locations for
those subdirs if they require passwords, etc.
How would I do the if not subdir1|subdir2|myfacebookapp rewrite to http
check?
This looks odd to me, I’ve never seen a rewrite in an ssl config. It
will complicate things.
Leave the index to the server config, and take out the location / rewrite.
Simplify.
Stefan,
The only reason I had the rewrite in there (and I think it was
recommended to me years ago) was to prevent people or bots from calling
the non-ssl directories of the site with https and creating duplicates
in Google, etc. e.g. calling http://www.example.com/ and https://www.example.com/ when my homepage doesn’t need https.
I only needs https calls on my phpMyAdmin, webmail, facebookapp and site
admin subdirectories. I just wrote another email in the thread asking if
I should only do a rewrite if it’s NOT those directories.
This looks odd to me, I’ve never seen a rewrite in an ssl config. It
will complicate things.
Leave the index to the server config, and take out the location /
rewrite.
Simplify.
Get the general app working, and then apply specialized rules for
directories and urls. Remember, if you have told nginx to do something
that it can do, the logs won’t show much except that it’s doing what
it’s been told.