I want all urls that are http to be redirected to https.
changes to
I have this snippet in my nginx conf that achieves this effect:
upstream examplewsgicluster {
server unix://tmp/example.sock;
}
server {
listen 80;
server_name beta.example.com www.example.com example.com;
rewrite ^ https://example.com$request_uri? permanent;
}
server {
listen 443;
location / {
include uwsgi_params;
uwsgi_pass examplewsgicluster;
uwsgi_read_timeout 700;
}
}
how can I edit this rule so that paths that begin with /admin/ do not get redirected?
so http://example.com/admin/blah/blah does not get redirected.
1 Answers