WebFaction
Community site: login faq

Following the instructions in the blog, I enable mod_pagespeed in a django site and it worked very well.

Then I tried the simpler instructions to enable it in a joomla site, but it's not working.

What I did was to add this line to .htaccess:

SetOutputFilter MOD_PAGESPEED_OUTPUT_FILTER

I tested using the command:

curl -D - http://mysite.com

For the django site the last line in the headers is:

X-Mod-Pagespeed: 0.9.0.0-128

This line is not present when testing the joomla site.

Maybe the server's global apache process wasn't restarted?
Or maybe something in my setup is preventing the mod_pagespeed to load?

Server is web146. Site is http://fra.mx

Thanks.

asked 21 Nov '10, 01:50

Carlos Gutie...
114
accept rate: 0%


Hi Carlos,

It looks like mod_pagespeed is working but the header is not being set, we've created an internal ticket to have it looked at.

permanent link

answered 21 Nov '10, 03:23

klynton
1.6k1210
accept rate: 41%

Hi, thanks for looking into it. I don't think it's working because html is no being rewritten as expected. For comparison check the django site http://supercp.mx (a q&a like this btw) where all white space was deleted and css/js where rewritten.

(21 Nov '10, 09:35) Carlos Gutie...

You have additional filters set in your httpd.conf for your Django application. Your Joomla application is using the server's Apache instance which does not have the same filters enabled.

(21 Nov '10, 10:09) aaronh ♦♦

@aaronh True, I thought collapse_whitespace and combine_css were enabled by default. Also: I had some internal joomla utilities enabled which were combining css/js, I've just disabled them, you can now see that js/css don't seem to be minified.

(21 Nov '10, 11:26) Carlos Gutie...

Currently, the only mod_pagespeed settings in use are:

ModPagespeedUrlPrefix
ModPagespeedFileCachePath
ModPagespeedGeneratedFilePrefix

If you require additional filters you can install your own instance of Apache.

If you disable the joomla utilities, it will stop minifying the css and javascript. I would recommend leaving them on because the mod_pagespeed filters are not in use.

(21 Nov '10, 11:30) aaronh ♦♦

@aaronh If only those settings are in use, you should update the info at http://blog.webfaction.com/2010/11/speed-up-your-pages-with-mod_pagespeed/ It states that:
add_head
combine_css
rewrite_css
rewrite_javascript
inline_css
inline_javascript
rewrite_images
insert_img_dimensions
extend_cache
are enabled for static/php/cgi apps. And yes, I'm going to enable the plugins again, I just disabled them to help you test if mod_pagespeed was working or not.

(21 Nov '10, 11:39) Carlos Gutie...
1

Sorry for the confusion. We are using the default filters listed in our blog post for static/cgi/php apps, but as far as I can tell it only seems to be working for static HTML, and not for PHP served as HTML. We'll look into this and try to have it corrected ASAP.

(21 Nov '10, 12:40) seanf

Sorry to dig up such an old thread, but it seems like mod_pagespeed is still not working properly for PHP.

A simple PHP page doesn't get picked up by mod_pagespeed. The same file as html works just fine.

You can tell because the inline style is being rewritten in the HTML version but not the PHP version. Also, this header entry comes with the HTML version: X-Mod-Pagespeed:0.10.21.2-1381.

Any ideas?

(19 Apr '12, 00:00) gsong

Hi,

Sorry, but mod_pagespeed does not work with PHP on our servers. There is a workaround - serve your PHP scripts with the cgi-script handler (instead of the php54-cgi handler), and include the following line in the beginning:

#!/usr/local/bin/php-cgi

(19 Apr '12, 06:35) todork
showing 5 of 8 show 3 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×10

question asked: 21 Nov '10, 01:50

question was seen: 5,740 times

last updated: 19 Apr '12, 06:35

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM