Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Hello world!


5:56 pm on Feb 23, 2014 (gmt 0)

New User

5+ Year Member

joined:Feb 21, 2014
votes: 0

We have chosen WebmasterWorld to help users improving their webmaster knowledge and to solve their issues! :)
We will help in everything we can!
7:16 pm on Feb 23, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:June 14, 2010
votes: 0

Hi 2FreeHosting! Welcome to Webmaster World. Thanks for droppin' in. As a matter of fact we can put your knowledge to work right away!

So here's my dilemma. I just signed someone up for a new shared hosting account with a provider that I didn't have any experience with concerning shared hosting. I've used them for many years for VPS, and even though their overall tech support knowledge was lukewarm, they are failing badly with shared hosting support knowledge.

My latest problem is I want to enable gzip compression for serving php, html, css and javascript.

I applied this in the .htaccess file (like I've used elsewhere for years):
<FilesMatch "\.(php|html|css|js)$">
SetOutputFilter DEFLATE

...but it wasn't compressing output. I contacted their tech support, explained what I had done to that point, and to enquire about Apache mod_defate being enabled they said it is. They didn't offer any proactive suggestions. I got back to them and asked if they are using an alternative because I noticed they're using NGINX. I know that because it kept revealing itself on each 502 Bad Gateway error message after lengthy timeouts (prior support ticket request that took them 6 days to figure out even though they kept insisting there was no problem on their end).

So I said like, maybe you are using something different in terms of configuration due to NGINX and maybe you can enlighten me, Joe tech comes back to me and says they ARE using Apache and it should work because they are only using NGINX as a reverse proxy.

...and they say like here try this version instead:
# compress text, HTML, JavaScript, CSS, and XML
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# remove browser bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzi

And so like, I try it right...but bugger me, it didn't fixed the problem, it really really didn't, so I'm like hey guys it's no good what else can try eh?! And they come come back to me and like; we'll leave the ticket open and let us know if you have any any other problems. D'uh yes, the one you haven't helped me with yet!

So I'm like I give up on youse guys. I fixed it by using php compression instead by putting this in .htaccess:
php_flag zlib.output_compression on

And this at top of each website page:
<?php if(!ob_start("ob_gzhandler")) ob_start(); ?>

...and voila it works. But I'm not happy with this way of doing it. I'd rather it be done server side with Apache.

Any ideas where I can dig?