LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-15-2009, 09:34 AM   #1
keita_mog
LQ Newbie
 
Registered: Sep 2008
Posts: 11

Rep: Reputation: 0
Apache and HTTP Compression


Hi everyone!

I am planning on implementing HTTP Compression in my site, I have been reading and I see big advantages by "gzipping" content from server so that bandwidth could be reduced when reached to client-side.

From what I read, I could add the following pro's:
- Content is compressed when sent from server to client, leveraging bandwidth traffic, reaching in a "faster" way to the user.

And the con's I understand:
- Compression algorithm requires CPU loads
- Compression takes place with text content, not images, etc

Am I missing any other important thing to consider?
 
Old 01-16-2009, 02:58 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,466

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Hi

I have turned this on, and the difference is huge if you have a slow internet connection. The CPU usage on the web server increases, but not very much. So unless the CPU on the server is very slow, there will not be a problem. You save a lot of bandwidth, and also, since the server spends less time on each client, I think the difference on server load is not much different.

If you use Apache2, it's very easy to set up:

sudo a2enmod deflate

But if your webserver has lots of PHP scripts, it will not make a difference. To get PHP scripts compressing, you need to edit your php.ini:

zlib.output_compression = On
 
Old 01-19-2009, 09:45 AM   #3
keita_mog
LQ Newbie
 
Registered: Sep 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Guttorm View Post
Hi

I have turned this on, and the difference is huge if you have a slow internet connection. The CPU usage on the web server increases, but not very much. So unless the CPU on the server is very slow, there will not be a problem. You save a lot of bandwidth, and also, since the server spends less time on each client, I think the difference on server load is not much different.

If you use Apache2, it's very easy to set up:

sudo a2enmod deflate

But if your webserver has lots of PHP scripts, it will not make a difference. To get PHP scripts compressing, you need to edit your php.ini:

zlib.output_compression = On
Thanks a lot!! That was exactly what I was looking for , I'll implement it right now to see the improvements
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache: http://localhost (work) http://ipaddress (not working) sarmad Linux - Newbie 7 02-05-2013 07:47 AM
Apache HTTP Server gjagadish Programming 1 08-10-2006 09:10 AM
apache http://localhost/mysite ---> http://localhost/mysite/index.php how? ilnli Linux - General 8 06-04-2005 03:23 PM
Apache problem with displaying compression/archive files. Akujin Linux - Networking 4 03-09-2005 02:18 AM
http://localhost apache matt3333 Linux - Software 16 05-25-2003 01:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration