Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2021-10-23, 22:05:04

Author Topic: How to add HSTS with preloading to Kloxo when using nginx  (Read 850 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,051
  • Karma: +1/-0
    • View Profile
1. Logon to Kloxo.

2. Choose Domains -> yourdomainname.com -> Web Features -> change exisiting HTTPS header to:

Code: [Select]
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always
click Update

3. Then Choose Domains -> yourdomainname.com -> Web Basics -> select Force Redirect 'domain.com' To 'www.domain.com'  and Force Redirect 'http' To 'https' then click Update.

4. Edit /opt/configs/nginx/conf/domains/yourdomainname.com and change line (only the first occurence, leave the second one untouched):
 
Change:

Code: [Select]
  if ($host ~* ^(yourdomainname.com)$) {
                rewrite ^/(.*) 'http://www.yourdomainname.com/$1' permanent;
        }

to

Code: [Select]
  if ($host ~* ^(yourdomainname.com)$) {
                rewrite ^/(.*) 'https://yourdomainname.com/$1' permanent;
        }

and save the file.

5. Restart nginx with:

Code: [Select]
service nginx restart
6. Go to: https://hstspreload.org/

Enter your domain and click the button under domain field.

7. Check both checkboxes "I am the site owner..." and "I understand that preloading...". and click "Submit..." button.
« Last Edit: 2021-06-30, 00:40:19 by Spacedust »

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix
Click Here

Page created in 0.065 seconds with 19 queries.

web stats analysis