I have the following configuration:
server{
ssl on;
listen 443 ssl;
...
location = / {
return 301 https://$host/appName;
}
location = /appName {
...
proxy_pass $some_internal_server;
...
}
}
When I type in a browser https://my_url I'm redirected to http://my_url/appName instead of https://my_url/appName
How can I fix this?
Best Answer
The best way to fix a 301 is another 301.