Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameter to enforce redirect HTTP to HTTPS #71

Open
jrenggli opened this issue Jan 17, 2015 · 0 comments
Open

parameter to enforce redirect HTTP to HTTPS #71

jrenggli opened this issue Jan 17, 2015 · 0 comments

Comments

@jrenggli
Copy link

It's often a use case to support both http and https connections but redirect all requests from http to https. Currently you'd have to configure two vhost resources for this. What I'm looking for is a simple parameter (e.g. ssl_enforce) to achieve this with only one vhost resource.

The following snippet should be added

server {
       listen         80;
       server_name    my.domain.com;
       return         301 https://$server_name$request_uri;
} 

What do you think about this? Is this somewhat useful? What should be the name of this parameter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant