How do I prevent a location from being matched by the ssl rewrite?
server {
listen 80;
server_name example.net;
location = /feeds/ {
break;
}
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443;
...
Put the rewrite in a location block. nginx only applies one location block at each level, so if
/feeds/
is matched the other block won't be applied: