can't enable Gzip Compression
Hello to everyone,
I have build a website and i bought a server... i have chose cPanel to install into my server and i was trying how to enable Gzip Compression to my server from cpanel features,
into cpanel there is a feature "Optimize website" and i chose compress whole website, but after that i get one error like this :
What should i do, any idea? Thanks.
An error was encountered while attempting to apply the specified options. OptimizeWS::eek:ptimizews(all,text/html text/plain text/xml) failed: Error while opening /home/mywebsite/.htaccess: Permission denied
What should i do, any idea? Thanks.
-
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 -
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 -
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 -
Yes, it's like this /home/usernameofFTP/public_html/.htaccess any idea what to do please? 0 -
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 -
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 -
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 -
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.
Comments
8 comments