HTTPS server with http location:
server {
listen 443;
root /var/www/
location / {
...
}
location /http {
rewrite ^ http://$host$request_uri? permanent;
}
}
HTTP server redirects to HTTPS except one location:
server {
root /var/www/
location / {
rewrite ^ https://$host$request_uri? permanent;
}
location /http {
...
}
}