Skip to main content

can't enable Gzip Compression

Comments

8 comments

  • NOC_Serverpoint
    Hi, Can you please check the permission of the '.htaccess' file under you '/home/mywebsite/.htaccess' ? If you have command line access, please use the below command: -- ls -l /home/mywebsite/.htaccess --
    0
  • h0feer
    Hello, Thanks for your reply, i tired using command line but i get one error "no such file or directory" but i checked .htaccess permission using FTP Permission of .htaccess is : 0644 any idea?
    0
  • SysSachin
    Error while opening /home/mywebsite/.htaccess: Permission denied

    Are you sure the .htaccess file path is showing that or it's /home/USERname/public_html/.htaccess ?
    0
  • h0feer
    Yes, it's like this /home/usernameofFTP/public_html/.htaccess any idea what to do please?
    0
  • SysSachin
    Hello, Login to server through SSH client and check the .htaccess file permission. --- ls -l /home/UserName/public_html/.htaccess ----- Permission should be 644
    0
  • h0feer
    Hello, Here is what i get -rw-r--r-- 1 root username 258 Sep 7 21:26 /home/username/public_html/.htaccess Permission are : 0644 Still i get the same error, But, i logged in through FTP and i changed .htaccess owner status from "Username" to "Root" also group from username to root, and it worked properly, but is there any bad thing that i changed this ? anything risky ? also when i check gzip compression status its still giving me that it's not enabled
    0
  • NOC_Serverpoint
    Hello, Before enabling gzip compression, please check if ' mod_deflate' is enabled in your server. If mod_deflate module is not enabled then run easyapache on the server to enable that module. How to run easyapache? 1. Login to your cPanel server via SSH as root and run the below command : /scripts/easyapache Recompile apache with the mod_deflate module enabled OR 2. You can also run easyapache via WHM Login to WHM (Web Host Manager) and click on "EasyApache (Apache Update)" Under Software Home " Software " EasyApache (Apache Update) Enable the mod_deflate module and do the steps to enable compression from cPanel "optimize website" under "software and services" Thank you,
    0
  • cPanelMichael
    Hello, The "Optimize Website" feature uses the .htaccess file in the account's home directory, as opposed to the one in the account's public_html directory. Please revert the ownership values on the .htaccess file back to the account username. Also, after enabling "Optimize Website" via cPanel, post the contents of the .htaccess file and let us know it's permission/ownership values:
    stat /home/$username/.htaccess cat /home/$username/.htaccess
    Ensure to replace any real domain names or IP addresses with examples. Thank you.
    0

Please sign in to leave a comment.