apache / incubator-pagespeed-cpanel

mod_pagespeed module for CPanel WHM
Other
144 stars 50 forks source link

mod_pagespeed option not in WHM #2

Closed teacii closed 11 years ago

teacii commented 11 years ago

HI,

I did: git clone http://github.com/pagespeed/cpanel.git /var/cpanel/easy/apache/custom_opt_mods/mod_pagespeed

The files were correctly copy and I can see them. Now if I have no misunderstood, in WHM -> EasyApache (Apache Update)-> Exhaustive list The option of mod_pagespeed should be present for me to select.

It is not there :( I am running CENTOS 6.4 x86_64 Apache 2.2.24 Easy::Apache v3.18.13 with cPanel 11.36.1

Any tips?

igrigorik commented 11 years ago

Hmm, well that's not good!

I'm guessing, the current structure is: /var/cpanel/easy/apache/custom_opt_mods/mod_pagespeed/Easy/...

We may be missing an extra namespace there, can you move the files such that its: /var/cpanel/easy/apache/custom_opt_mods/mod_pagespeed/Cpanel/Easy/...

Note the Cpanel directory.. and see if EasyApache shows it then?

teacii commented 11 years ago

Tried what you suggested and a bit more. The option just does not come up :-(

igrigorik commented 11 years ago

Doh! Hmm, looks like I'll have to spin up a VM and run through the tests again.. Stay tuned.

k0nsl commented 11 years ago

Same issue here.

k0nsl commented 11 years ago

Nevermind. It does show up if I copy the structure to:

/var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy : Speed.pm --: pagespeed

Compiling now.

teacii commented 11 years ago

Confirmed. That works for me too. Thanks.

k0nsl commented 11 years ago

Although, upon completion in EasyApache, I get:

-- Begin opt 'mod_pagespeed (Author: Prajith) (Custom Opt Mod)' -- Could not chdir into 'pagespeed/': No such file or directory -- End opt 'mod_pagespeed (Author: Prajith) (Custom Opt Mod)' --

teacii commented 11 years ago

I got error at the start of the build already:

Checking that all tarballs are present and up to date. !! Custom opt mod 'Cpanel::Easy::Speed' is using custom opt mod tarball '/var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy/Speed.pm.tar.gz' !! Custom opt mod tarball '/var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy/Speed.pm.tar.gz' does not exist !! Custom opt mod tarball '/var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy/Speed.pm.tar.gz' does not exist !!

k0nsl commented 11 years ago

Yes you must create the tarball and name it Speed.pm.tar.gz, inside it should probably be the directory 'pagespeed'. I only did this stuff in a hurry (and it didn't quite work because my tarball probably didn't have the right structure). Will look into this more later, must have some food now ;)

teacii commented 11 years ago

So for those who face similar problems, here are the steps that worked for me:

Step 1: Copy git clone http://github.com/pagespeed/cpanel.git /var/cpanel/easy/apache/custom_opt_mods/Cpanel/

Step 2: Create a Speed.pm.tar.gz cd /var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy tar -zcvf Speed.pm.tar.gz pagespeed

Step 3: In cPanel WHM-> EasyApache - You will see the mod_pagepeed in the options to compile. Check and compile.

Optional: The compile should work without a hitch. You may get a messages saying: Option ModPagespeedGeneratedFilePrefix is depricated and should be removed. if this bothers you, then go to: /usr/local/apache/conf/pagespeed.conf Towards the top there is a line: ModPagespeedGeneratedFilePrefix "/var/mod_pagespeed/files/" Change it to (essentially commenting it):

ModPagespeedGeneratedFilePrefix "/var/mod_pagespeed/files/"

Save and reboot httpd.

Cheers and thanks to everyone here who helped towards the solution.

k0nsl commented 11 years ago

Yep, that solution works. But in mod_pagespeed statistics are anybody actually getting any cache hits? Mine is always at zero.

joerocklin commented 11 years ago

Same here - the steps work, and I'm never seeing any cache hits.

teacii commented 11 years ago

Dumb question... where would you see the cache hits? I see that pagespeed is working in the files that get compressed or re-written. An tips?

k0nsl commented 11 years ago

teacli, You can watch statistics via:

http://whatever-url/mod_pagespeed_global_statistics

Just don't forget to allow connections for your host in pagespeed.conf

-k0nsl

igrigorik commented 11 years ago

Thanks guys, updated the install instructions in the readme: https://github.com/pagespeed/cpanel/blob/master/README.md - let me know if I missed anything.

Re, global statistics.. From our docs: "Global Statistics: if UsePerVHostStatistics is on this will permit you to access statistics aggregated over all the virtual hosts on the server." See here: https://developers.google.com/speed/docs/mod_pagespeed/configuration

Sameh123 commented 10 years ago

When I do tar -zcvf Speed.pm.tar.gz pagespeed is says:

tar: pagespeed: Cannot stat: No such file or directory tar: Exiting with failure status due to previous errors

igrigorik commented 10 years ago

Have you verified that the repo was cloned correctly and the archive is in place?

Sameh123 commented 10 years ago

I don't have much experience in this but when I do "dir" in "/var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy" I see it there:

ModFastInclude.pm ModFastInclude.pm.tar.gz Speed.pm.tar.gz

igrigorik commented 10 years ago

make sure you run the command from within that directory.

On Mon, Dec 23, 2013 at 12:01 PM, Sameh123 notifications@github.com wrote:

I don't have much experience in this but when I do "dir" in "/var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy" I see it there:

ModFastInclude.pm ModFastInclude.pm.tar.gz Speed.pm.tar.gz

— Reply to this email directly or view it on GitHubhttps://github.com/pagespeed/cpanel/issues/2#issuecomment-31130269 .

Sameh123 commented 10 years ago

I did.

wiredhosting commented 8 years ago

Can you update installation instruction For cPanel users that still use Easyapache 3?

THanks!

follow this steps.

Step1: COPY /usr/local/cpanel/3rdparty/bin/git clone https://github.com/pagespeed/cpanel.git /var/cpanel/easy/apache/custom_opt_mods/Cpanel/

Step 2: Create a Speed.pm.tar.gz cd /var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy tar -zcvf Speed.pm.tar.gz pagespeed

Step 3: In cPanel WHM-> EasyApache - You will see the mod_pagepeed in the options to compile. Check and compile.