but if you do that then you get redirected to https for all locations which is not what I want and if I wanted it I would do it without an if: server { listen 80; server_name mydomain.com; rewrite ^ https://$http_host$request_uri? permanent; } I only want all locations available through both http and https but a single location that has authentication where I want to force https. Itby diego_xa - How to...
itpp2012 Wrote: ------------------------------------------------------- > You call this high-maintenance: ?? > > server { > listen 80; > server_name mydomain.com; > location / { rewrite ^ https://$http_host$request_uri? permanent; } > } That is not what I have in my configurations. I have something like this: server { listen 80; listen 443 ssl;by diego_xa - How to...
Thank you for your answer. Well I know that is an option but I hate to have duplicated code everywhere, it is not very good for maintainance. It would be great to have a feature to make a redirect "high-priority"by diego_xa - How to...
I am having the problem described here: http://stackoverflow.com/questions/41229844/nginx-basic-auth-in-location-but-first-redirect-to-https Is there any way to do this in nginx? It seems that basic auth always takes precedence, which makes some sense, but sometimes you want to prioritice some things over it, like a redirect to https. Is this possible? How could I do this? Thank you and regaby diego_xa - How to...
Hi, I was recently reading the PHPfastcgi example at http://wiki.nginx.org/PHPFcgiExample. When it talks about the configuration to avoid the exploit on uploads folder, there is a regulare expresion saying: location ~* (^(?!(?:(?!(php|inc)).)*/blogs\.dir/).*?(php|inc)) { I don't understand that regular expresion. Could someone explain me what ?! ?: mean or send me some link to documentationby diego_xa - Nginx Mailing List - English
Hi, I was recently reading the PHPfastcgi example at http://wiki.nginx.org/PHPFcgiExample. When it talks about the configuration to avoid the exploit on uploads folder, there is a regulare expresion saying: location ~* (^(?!(?:(?!(php|inc)).)*/blogs\.dir/).*?(php|inc)) { I don't understand that regular expresion. Could someone explain me what ?! ?: mean or send me some link to dby diego_xa - Php-fpm Mailing List - English