Google page speed mod installed but not working

633 views
Skip to first unread message

Plato P

unread,
Dec 28, 2013, 3:23:42 AM12/28/13
to mod-pagesp...@googlegroups.com
My website is technewscentral.co.uk and I have isntalled page speed mod. Yet the urls and stuffs are not getting rewritten. Can someone please check it?

Jan-Willem Maessen

unread,
Dec 28, 2013, 10:51:53 PM12/28/13
to mod-pagesp...@googlegroups.com
Hi -

Poking around a bit, it's not obvious what's going wrong.  I suspect that mod_pagespeed may be having difficulty fetching the resources on you page due to details of you server configuration.  I'd suggest looking at your logs to see if you're getting a lot of "fetch failed" messages when you visit your pages.  If so I'd suggest looking into the domain mapping constructs, and maybe using LoadFromFile for static resources.  More details here:


If that doesn't help, it'd be useful to see your configuration (pagespeed.conf).

-Jan

PS - I notice you're using a fairly old release, 1.3, which was originally made last February.  It'd be worth considering an upgrade (or if you're on shared hosting, asking your hosting provider to upgrade).  I suspect, however, that this won't fix your most immediate problem of getting anything at all rewritten. :-)


On Sat, Dec 28, 2013 at 3:23 AM, Plato P <plato....@gmail.com> wrote:
My website is technewscentral.co.uk and I have isntalled page speed mod. Yet the urls and stuffs are not getting rewritten. Can someone please check it?

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/70ef3fd5-9aaf-4d8b-9b87-2789a1ab4c33%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Plato P

unread,
Jan 2, 2014, 8:55:59 AM1/2/14
to mod-pagesp...@googlegroups.com
Hello,
I am very sorry for being so late. I am facing this issue on my VPS.

Here is the pagespeed.conf file contents:
LoadModule pagespeed_module modules/mod_pagespeed.so
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedFetchWithGzip on
SetOutputFilter DEFLATE

AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html

ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
ModPagespeedGeneratedFilePrefix "/var/mod_pagespeed/files/"



ModPagespeedRewriteLevel PassThrough

ModPagespeedFileCacheSizeKb 102400
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedLRUCacheKbPerProcess 1024
ModPagespeedLRUCacheByteLimit 16384
ModPagespeedCssInlineMaxBytes 2048
ModPagespeedImageInlineMaxBytes 2048
ModPagespeedCssImageInlineMaxBytes 2048
ModPagespeedJsInlineMaxBytes 2048
ModPagespeedCssOutlineMinBytes 3000
ModPagespeedJsOutlineMinBytes 3000

ModPagespeedEnableFilters extend_cache,combine_css,move_css_to_head,rewrite_javascript,rewrite_images,add_head,rewrite_css,collapse_whitespace,remove_comments,remove_quotes,sprite_images,convert_meta_tags
ModPagespeedRespectVary on

<Location /mod_pagespeed_beacon>
SetHandler mod_pagespeed_beacon
</Location>

<Location /mod_pagespeed_statistics>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler mod_pagespeed_statistics
</Location>

ModPagespeedMessageBufferSize 100000
ModPagespeedDisallow */wp-admin/*
ModPagespeedXHeaderValue "Powered By mod_pagespeed"
<Location /mod_pagespeed_message>
Allow from localhost
Allow from 127.0.0.1
SetHandler mod_pagespeed_message
</Location>
<Location /mod_pagespeed_referer_statistics>
Allow from localhost
Allow from 127.0.0.1
SetHandler mod_pagespeed_referer_statistics
</Location>
</IfModule>
---

Let me know if there is something wrong with this.

Also is there anything special to be added to the .htaccess file?

Plato P

unread,
Jan 4, 2014, 1:23:11 PM1/4/14
to mod-pagesp...@googlegroups.com
Can somebody please help me?

Jan-Willem Maessen

unread,
Jan 5, 2014, 9:59:54 AM1/5/14
to mod-pagesp...@googlegroups.com
Hi -

As I noted in my previous message, it looks like mod_pagespeed may be having trouble fetching or caching your data.  I can't tell by accessing your server remotely which the problem might be, you'll need to look in the logs.  If you look at the error log (which is often in either /var/log/apache2/error.log or /usr/local/apache2/logs/error_log) you should be able to search for "mod_pagespeed" and see what errors might be occurring when you access a page on your site.

You should also check the permissions on /var/mod_pagespeed/cache and /var/mod_pagespeed/files to make sure mod_pagespeed is allowed to write files into these two directories (meaning whatever user apache is running as can create files there).  Just looking around these directories should make it obvious whether mod_pagespeed has been creating files there already.

-Jan


On Sat, Jan 4, 2014 at 1:23 PM, Plato P <plato....@gmail.com> wrote:
Can somebody please help me?

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Plato P

unread,
Jan 5, 2014, 10:21:55 AM1/5/14
to mod-pagesp...@googlegroups.com
Hello,
Thanks a lot for replying. I will check it and let you know:)


On Sunday, January 5, 2014 8:29:54 PM UTC+5:30, Jan-Willem Maessen wrote:
Hi -

As I noted in my previous message, it looks like mod_pagespeed may be having trouble fetching or caching your data.  I can't tell by accessing your server remotely which the problem might be, you'll need to look in the logs.  If you look at the error log (which is often in either /var/log/apache2/error.log or /usr/local/apache2/logs/error_log) you should be able to search for "mod_pagespeed" and see what errors might be occurring when you access a page on your site.

You should also check the permissions on /var/mod_pagespeed/cache and /var/mod_pagespeed/files to make sure mod_pagespeed is allowed to write files into these two directories (meaning whatever user apache is running as can create files there).  Just looking around these directories should make it obvious whether mod_pagespeed has been creating files there already.

-Jan
On Sat, Jan 4, 2014 at 1:23 PM, Plato P <plato....@gmail.com> wrote:
Can somebody please help me?

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Plato P

unread,
Jan 6, 2014, 4:22:11 AM1/6/14
to mod-pagesp...@googlegroups.com
Here is what my host replied me with:
I have given write permission and there the user is nobody means any user can write files so there will be no issues
========
[/var/mod_pagespeed/cache]# ll
total 24
drwxrwxr-x 5 nobody nobody 4096 Jan 5 18:00 ./
drwxr-xr-x 4 root root 4096 Dec 19 13:27 ../
-rw-r--r-- 1 nobody nobody 13 Jan 5 18:00 !clean!time!
drwxr-xr-x 9 nobody nobody 4096 Jan 4 20:52 http,3A/
drwxr-xr-x 3 nobody nobody 4096 Dec 19 15:05 prop_page/
drwxr-xr-x 36 nobody nobody 4096 Jan 2 02:42 rname/
========

Files directory is empty


On Sunday, January 5, 2014 8:29:54 PM UTC+5:30, Jan-Willem Maessen wrote:
Hi -

As I noted in my previous message, it looks like mod_pagespeed may be having trouble fetching or caching your data.  I can't tell by accessing your server remotely which the problem might be, you'll need to look in the logs.  If you look at the error log (which is often in either /var/log/apache2/error.log or /usr/local/apache2/logs/error_log) you should be able to search for "mod_pagespeed" and see what errors might be occurring when you access a page on your site.

You should also check the permissions on /var/mod_pagespeed/cache and /var/mod_pagespeed/files to make sure mod_pagespeed is allowed to write files into these two directories (meaning whatever user apache is running as can create files there).  Just looking around these directories should make it obvious whether mod_pagespeed has been creating files there already.

-Jan
On Sat, Jan 4, 2014 at 1:23 PM, Plato P <plato....@gmail.com> wrote:
Can somebody please help me?

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Jan-Willem Maessen

unread,
Jan 6, 2014, 8:45:49 AM1/6/14
to mod-pagesp...@googlegroups.com
OK, good it's not cache permissions.  How about the logs?  

-Jan


To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/d3411bc3-2f2f-4376-8508-73d86eaffede%40googlegroups.com.

Plato P

unread,
Jan 7, 2014, 1:36:55 AM1/7/14
to mod-pagesp...@googlegroups.com
Yes, I could see that fetch failed due to follow reason
[Mon Jan 06 17:32:02 2014] [warn] [mod_pagespeed 1.3.25.4-2941 @20023] 100x65xSurface_Update-100x65.jpg:0: Resource based on http://www.technewscentral.co.uk/wp-content/uploads/2013/12/Surface_Update-100x65.jpg but cannot access the original
[Mon Jan 06 17:32:02 2014] [warn] [mod_pagespeed 1.3.25.4-2941 @20023] [0106/173202:WARNING:resource_fetch.cc(186)] Fetch failed for resource url http://www.technewscentral.co.uk/wp-content/uploads/2013/12/100x65xSurface_Update-100x65.jpg.pagespeed.ic.f3xZwjrswp.jpg
[Mon Jan 06 17:32:02 2014] [warn] [mod_pagespeed 1.3.25.4-2941 @20023] Fetch failed for http://www.technewscentral.co.uk/wp-content/uploads/2013/12/100x65xSurface_Update-100x65.jpg.pagespeed.ic.f3xZwjrswp.jpg, status=404
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Jan-Willem Maessen

unread,
Jan 7, 2014, 2:48:15 PM1/7/14
to mod-pagesp...@googlegroups.com
On Tue, Jan 7, 2014 at 1:36 AM, Plato P <plato....@gmail.com> wrote:
Yes, I could see that fetch failed due to follow reason
[Mon Jan 06 17:32:02 2014] [warn] [mod_pagespeed 1.3.25.4-2941 @20023] 100x65xSurface_Update-100x65.jpg:0: Resource based on http://www.technewscentral.co.uk/wp-content/uploads/2013/12/Surface_Update-100x65.jpg but cannot access the original
[Mon Jan 06 17:32:02 2014] [warn] [mod_pagespeed 1.3.25.4-2941 @20023] [0106/173202:WARNING:resource_fetch.cc(186)] Fetch failed for resource url http://www.technewscentral.co.uk/wp-content/uploads/2013/12/100x65xSurface_Update-100x65.jpg.pagespeed.ic.f3xZwjrswp.jpg
[Mon Jan 06 17:32:02 2014] [warn] [mod_pagespeed 1.3.25.4-2941 @20023] Fetch failed for http://www.technewscentral.co.uk/wp-content/uploads/2013/12/100x65xSurface_Update-100x65.jpg.pagespeed.ic.f3xZwjrswp.jpg, status=404

Ah, as I suspected, your machine is probably behind a firewall that prevents it from loopback fetching from www.technewscentral.co.uk.  This means you'll have to set up domain mapping as described in:


Most likely you'll want a line like:

ModPagespeedMapOriginDomain localhost www.technewcentral.co.uk

If you know where WordPress is storing some of its static files, you might consider also setting up ModPagespeedLoadFromFile as described later on the same page, as this will lead to faster and more reliable performance for the files you map.  But I'd definitely suggest getting MapOriginDomain working first before you try this.

-Jan
 
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/5344e7b4-0283-4677-8559-611fca2ac3b7%40googlegroups.com.

Plato P

unread,
Jan 8, 2014, 12:58:26 PM1/8/14
to mod-pagesp...@googlegroups.com
I have been told that all the above things you mentioned is done. 
But it seems like pagespeed is still not rewriting. Could there be any other reason?

Jan-Willem Maessen

unread,
Jan 13, 2014, 5:02:55 PM1/13/14
to mod-pagesp...@googlegroups.com
Sorry, was out of town again.

On Wed, Jan 8, 2014 at 12:58 PM, Plato P <plato....@gmail.com> wrote:
I have been told that all the above things you mentioned is done. 
But it seems like pagespeed is still not rewriting. Could there be any other reason?

Can you look at your logs again – are you still seeing the messages you reported earlier?  What's in your pagespeed configuration?

-Jan
 

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Plato P

unread,
Jan 14, 2014, 1:36:09 AM1/14/14
to mod-pagesp...@googlegroups.com
Hello,
It is resolved now. As you said I was going through the error logs and found the following errors like you see on http://prntscr.com/2ib9nq in  /usr/local/apache/logs/error_log
After a bit of research I found it is linked to pagespeed and the document root in pagespeed was wrong from the following pages:


I told the support people about this and they managed to change it to the correct path. Everything is working properly now. 
Thanks a lot for helping!



On Tuesday, January 14, 2014 3:32:55 AM UTC+5:30, Jan-Willem Maessen wrote:
Sorry, was out of town again.
On Wed, Jan 8, 2014 at 12:58 PM, Plato P <plato....@gmail.com> wrote:
I have been told that all the above things you mentioned is done. 
But it seems like pagespeed is still not rewriting. Could there be any other reason?

Can you look at your logs again – are you still seeing the messages you reported earlier?  What's in your pagespeed configuration?

-Jan
 

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Jan-Willem Maessen

unread,
Jan 14, 2014, 10:24:34 AM1/14/14
to mod-pagesp...@googlegroups.com
Great, I'm glad to hear you finally got this resolved!


To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/1980e520-9f91-4045-ab5a-2ce87b23bc97%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages