x-mod-pagespeed is not getting enabled

63 views
Skip to first unread message

Vishal Shah

unread,
May 11, 2015, 10:09:52 PM5/11/15
to mod-pagesp...@googlegroups.com
Dear Team

I tried to follow instructions mentioned in this blog to install mod_pagespeed.

After appying all the filters, I still can not see that .jpg are converted into wbnp . Moreover, CSS and JS are still same and they are not optimized. Thus, I can see any benefits out of this module.  This means something must have wrong somewhere. I would like community to help me around here ( if possible).

I am using AWS - EC 2 t2.medium instance [Server: Apache/2.2.15 (CentOS)]. 

Here is url where i tried to test pagespeed module.


Below are output of CURL where I dont see x-mod-pagespeed..

#######
[root@ip- conf.d]# curl -I https://www.takebestloans.com
HTTP/1.1 200 OK
Date: Tue, 12 May 2015 01:56:51 GMT
Server: Apache/2.2.15 (CentOS)
Vary: Accept-Encoding
Cache-Control: max-age=0, no-cache
Connection: close
Content-Type: text/html; charset=UTF-8

#######

Below are first few lines of pagespeed.conf details

############
# Attempt to load mod_version if it wasn't loaded or compiled in (eg on Debian)
<IfModule !mod_version.c>
  LoadModule version_module /usr/lib64/httpd/modules/mod_version.so
</IfModule>

<IfVersion < 2.4>
  LoadModule pagespeed_module /usr/lib64/httpd/modules/mod_pagespeed.so
</IfVersion>
<IfVersion >= 2.4.2>
  LoadModule pagespeed_module /usr/lib64/httpd/modules/mod_pagespeed_ap24.so
</IfVersion>

# Only attempt to load mod_deflate if it hasn't been loaded already.
<IfModule !mod_deflate.c>
 LoadModule deflate_module /usr/lib64/httpd/modules/mod_deflate.so
</IfModule>
<IfModule pagespeed_module>
    # Turn on mod_pagespeed. To completely disable mod_pagespeed, you
    # can set this to "off".
   
 ModPagespeed on


ModPagespeedEnableFilters move_css_to_head,move_css_above_scripts
ModPagespeedEnableFilters remove_comments,collapse_whitespace
ModPagespeedEnableFilters combine_javascript,convert_jpeg_to_webp

   

###########


So can anyone help me to find what is wrong and how can i enable x-mo-pagespeed
Thanks

Vishal Shah

unread,
May 11, 2015, 10:37:03 PM5/11/15
to mod-pagesp...@googlegroups.com
adding Apache conf details where SetOutputFilter is set as DEFLATE.

#############


<VirtualHost 172.31.2.215:80>
Redirect XXXXXXX
DocumentRoot XXXXXXX
ErrorLog XXXXXXX
CustomLog XXXXXXX
ScriptAlias /cgi-bin/ XXXXXXX
# AllowOverride All
DirectoryIndex index.html index.htm default.htm default.html index.php index.php4 index.php5
<Directory /data/website/takebestloans>
        Options Indexes +IncludesNOEXEC +FollowSymLinks
        allow XXXXXXX
        AllowOverride XXXXXXX
        SetOutputFilter DEFLATE
        AddOutputFilterByType DEFLATE text/html
</Directory>
</VirtualHost>

and few more <VirtualHost> setttings
##############

Joshua Marantz

unread,
May 11, 2015, 10:44:58 PM5/11/15
to mod-pagespeed-discuss
You need to have something like this:
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
Please see https://developers.google.com/speed/pagespeed/module/configuration for details.

How did you install mod_pagespeed?  I do not know what blog you are talking about, but please read the official instructions, starting here: https://developers.google.com/speed/pagespeed/module/download

-Josh

--
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/b03da7ea-e506-4305-9669-990efa1dc904%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Vishal Shah

unread,
May 11, 2015, 11:54:01 PM5/11/15
to mod-pagesp...@googlegroups.com
Thanks for your reply.  This has been already set and here is grep result of the same. Do let me know if I need to set on some other config file.

##############

[root@ip-172-31-2-215 etc]# grep -ir "MOD_PAGESPEED_OUTPUT_FILTER" .
./httpd/conf.d/pagespeed.conf:    AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
./httpd/conf.d/pagespeed.conf:    # AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER application/xhtml+xml
Binary file ./httpd/modules/mod_pagespeed.so matches
Binary file ./httpd/modules/mod_pagespeed_ap24.so matches

##############


I also tried with CURL to see header but I dont see X-Page-Speed .

###############

[root@dev conf]#  curl -D- https://takebestloans.com | less
 
 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
107   322  107   322    0     0    648      0 --:--:-- --:--:-- --:--:-- 64400
HTTP/1.1 301 Moved Permanently
Date: Tue, 12 May 2015 03:11:07 GMT
Server: Apache/2.2.15 (CentOS)
Vary: Accept-Encoding
Content-Length: 322
Connection: close
Content-Type: text/html; charset=iso-8859-1
 
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>

#######################

On the other side, phpinfo  [https://www.takebestloans.com/test.php] shows that it has installed and version is 1.9.32.3-4448

I hope you will able to share your view on possible cause of this issue.

Thanks
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Jeff Kaufman

unread,
May 12, 2015, 9:00:15 AM5/12/15
to mod-pagespeed-discuss
I see PageSpeed installed on your site:

$ headers https://www.takebestloans.com/
HTTP/1.1 200 OK
Date: Tue, 12 May 2015 12:55:16 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Set-Cookie: PHPSESSID=4ofte1juln59ln3mlpj4j5b2j0; path=/
Cache-Control: max-age=0, no-cache, no-store, must-revalidate,
post-check=0, pre-check=0
Pragma: no-cache
X-Mod-Pagespeed: 1.9.32.3-4448
Vary: Accept-Encoding
Content-Length: 27294
Connection: close
Content-Type: text/html; charset=iso-8859-1

You didn't see this with https://takebestloans.com because that
returns a redirect and PageSpeed doesn't insert its header on
redirects.

I can see PageSpeed acting on your site by removing comments, so it is
on and running.

The main problem is that all of your resources are HTTPS and PageSpeed
can't fetch HTTPS by default. Could you set:

ModPagespeedFetchHttps enable

to turn on fetching?
>>> email to mod-pagespeed-di...@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-di...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mod-pagespeed-discuss/6f994ece-632a-44cd-9c3b-c9c4652d70c2%40googlegroups.com.

Vishal Shah

unread,
May 13, 2015, 11:25:42 PM5/13/15
to mod-pagesp...@googlegroups.com
Thanks Jeff

I updated pageseed.conf file with above suggestions. It worked. 

We can close this thread. 

>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/mod-pagespeed-discuss/b03da7ea-e506-4305-9669-990efa1dc904%40googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
> --
> 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
Reply all
Reply to author
Forward
0 new messages