Why changes in htaccess is not working in hestiacp?

Hi there,

I have implemented mod headers code in htaccess of root folder of website. But unfortunately after verifying with securityheaders.com, I have found that the code implemented is not working,

Everything was working fine with other control panel but it’s not working with hestia, don’t know the exact reason why?

Please help me in finding the correct solution for this. I have also included the directory block with allowoverride all directive in apache2.conf, still it’s not working,

Please help me out in this,

Thanks in advance…!

My website is https://zaheer.co.in, Anyone checkout it at security headers website mentioned above.

My server is using HestiaCP,

Please help me out in making changes so that htaccess works fine for all the changes made in that.

Hi,

Did you enable the headers module?

Check if it’s enabled:

apache2ctl -M | grep headers

If there’s no output, you need to enable it:

a2enmod headers
systemctl restart apache2

Then, try again.

2 Likes

Hi,

if you’re using Hestia CP with nginx as proxy and apache2 as web server you need to add the headers to nginx configuration.
Using nginx templates for exemple.

If you don’t have a explicit proxy_hide_header in Nginx, by default Nginx should pass the headers provided by the Apache2 backend.

2 Likes

You’re right ! just tested it.

Thank you, can’t figure out why it didn’t work when I first tester it

2 Likes