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

HTTP Strict Transport Security (HSTS) #291

Open
accuraz opened this issue Jan 14, 2021 · 1 comment
Open

HTTP Strict Transport Security (HSTS) #291

accuraz opened this issue Jan 14, 2021 · 1 comment

Comments

@accuraz
Copy link

accuraz commented Jan 14, 2021

I'm trying to activate HTTP Strict Transport Security (HSTS) by following NGINX's official approach.

As I understand it, its a matter of adding a header directive into ssl server block.

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

I tried to add the directive in ssl server block sites-available/exemple.com.conf before and after root directory declaration and by comment it in nginx.conf

I also tried to not add header into exemple.com.conf and instead add it in nginx.conf.

None of that configuration will work.

Maybe someone here uses HSTS and successfully configured it.

Some help would be great.

Thank you per advance.

@mbomb007
Copy link

https://github.com/perusio/drupal-with-nginx/blob/D7/nginx.conf

You have to put it in nginx.conf (it's already in there, just uncomment it), and it must not be in your example.com.conf

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

2 participants