Server and Web Integrator
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-06-14, 14:41:35

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

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • 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):

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


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 »


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.05 seconds with 17 queries.

web stats analysis