How to get my arrowchat component working with mod_pagespeed

89 views
Skip to first unread message

m.bru...@btinternet.com

unread,
Oct 20, 2017, 6:45:19 AM10/20/17
to mod-pagespeed-discuss
Hi,

I am using arrowchat on my website which has worked fine until recently installing mod_pagespeed on my VPS server. I have been digging around and see there may be a way to tell mod_pagespeed to ignore certain files. 

To use arrowchat I have to install the following in my website header area:

<link type="text/css" rel="stylesheet" id="arrowchat_css" media="all" href="/arrowchat/external.php?type=css" charset="utf-8" />
<script type="text/javascript" src="/arrowchat/includes/js/jquery.js"></script>
<script type="text/javascript" src="/arrowchat/includes/js/jquery-ui.js"></script>

And the following in the footer area:

<script type="text/javascript" src="/arrowchat/external.php?type=djs" charset="utf-8"></script>
<script type="text/javascript" src="/arrowchat/external.php?type=js" charset="utf-8"></script>

The chat bar used to display correctly until installing mod_pagespeed - now it does not show and I see the following js error in Google Inspect:

Uncaught SyntaxError: Unexpected token <               https://www.mysite.com/arrowchat/external.php,qtype=js.pagespeed.jm.glkHRC0G1s.js

My question is, can I prevent pagespeed from changing this file so my component can work again? If so, how/where do I do this? Can I add it to the htaccess file? If yes, what do I put in that file? I do have access to SSH but I am not very familar with this (but prepared to have a go if I know where the mod_pagespeed file is stored). I am on VPS EasyApache 4, Centos 6xxx with Cpanel WHM

Any advice would be most appreciated

Mel



Longinos

unread,
Oct 21, 2017, 2:36:06 PM10/21/17
to mod-pagespeed-discuss
Hi
Try to disable these url like:

ModPagespeedDisallow "*/external.php*"

This line in the pagespeed.conf file

Joshua Marantz

unread,
Oct 21, 2017, 4:40:43 PM10/21/17
to mod-pagespeed-discuss
Yes, exactly right, and that can also be put in the .htaccess file.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/1ec9cdba-b09b-443a-85a9-34798ecff22d%40googlegroups.com.

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

m.bru...@btinternet.com

unread,
Oct 22, 2017, 7:09:08 AM10/22/17
to mod-pagespeed-discuss
Hi,

thanks for your response. I have access to SSH but I wasn't sure how to find the pagespeed.conf file. A Google search said to use this command: find . -name pagespeed.conf

WHen I run this command it comes back with this:

/rpmbuild/BUILD/etc/httpd/conf.d/pagespeed.conf

when I open that to edit using:  
nano /rpmbuild/BUILD/etc/httpd/conf.d/pagespeed.conf

It opens an empty file. Should there be something in it already? Do I just add that line ModPagespeedDisallow "*/external.php*" to that empty file and save?

I did try adding that line to my htaccess file but it caused an internal server error (500)

m.bru...@btinternet.com

unread,
Oct 22, 2017, 7:56:19 AM10/22/17
to mod-pagespeed-discuss
I finally managed to add it to .htaccess it seemed to accept it as follows without throwing an error:

<IfModule pagespeed_module>
 ModPagespeedDisallow "*/external.php*"
</IfModule>

However, it has no impact at all - I still see the external.php error and component is not loading. 
I also tried just adding the line to the blank pagespeed.conf I found and saved it, but that didn't do anything either. Not sure what else to do other than try and remove mod_pagespeed.

Longinos

unread,
Oct 22, 2017, 1:33:55 PM10/22/17
to mod-pagespeed-discuss

Don´t exist /etc/httpd/conf.d/pagespeed.conf ?
Well, apache had a config file, in version Apache 2 called httpd.conf,  these file had an include directive with the path to the in use mod_pagespeed config file.
When mod_pagespeed config file is changed  apache need to be restarted.
I don´t know if changes in .htaccess need the same



m.bru...@btinternet.com

unread,
Nov 3, 2017, 5:31:32 AM11/3/17
to mod-pagespeed-discuss
Hi Longinos,

it turns out that the file is stored at: ./rpmbuild/BUILD/etc/httpd/conf.d/pagespeed.conf

There was a dot before the '/' is this normal?

Anyway, I opened that file and can see all the generic settings so I added the line suggested above to the very bottom before the closing </...> and saved. Is that correct?

However, although I have enabled mod_pagespeed on my server and have selected it in EasyApache via WHM when I run the test to see if it is working on my site at: 


It shows that it isn't working. 

But if I run google's own pagespeed test my scores have gone higher. Does this mean it is actually working?

Longinos

unread,
Nov 4, 2017, 11:58:00 AM11/4/17
to mod-pagespeed-discuss
Hi m.bru...

The dot before slash is a relative path opossed to an absolute path. If you are at / , both paths are the same, but if you ae at, say, /home , the paths becomes /home/rpmbuild....
Because the path is ./rpmbuild/BUILD that make me think that are a directory where the rpm package is build. When the rpm package is installed the directories from where apache runs or the config files stays are other.

You can see if mod_pagespeed is working if you see css,js or images files that get the url rewrited like that http://mysite.com/file_name.css.pagespeed.cf.0z7LfFKb3K.css or in the headers you see one like that
x-page-speed:
1.12.34.3-0
Reply all
Reply to author
Forward
0 new messages