You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Arnold <ca...@electrichendrix.com> on 2007/08/14 17:15:07 UTC

[users@httpd] Zip some script?

Hello all! I have a site http://www.mytimewithgod.net and this site has
a bunch of <script>. I have searched the apache site to find
mod_deflate. I believe this is what i want to use to "condense" all the
script. So, according to
http://httpd.apache.org/docs/2.0/mod/mod_deflate.html i should install
mod_deflate and configure. Is it really that easy? Any things i should
watch out for? Using SLES10 SP1 and apache2 2.2.3. Thanks

Chris

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Zip some script?

Posted by Nick Kew <ni...@webthing.com>.
On 17 Aug 2007, at 01:32, Chris Arnold wrote:

> Yes, i ahve this in /etc/apache/sysconfig.d:
> LoadModule mod_deflate			  /usr/lib/apache2-prefork/mod_deflate

That's a syntax error.  So I infer it's not in an Apache  
configuration file.
Check http://wiki.apache.org/httpd/DistrosDefaultLayout for where to
find it, and look for existing LoadModule lines for the syntax.

> and mod_deflate is located in the aboce path. This is in /etc/ 
> apache2/default-server:
> <Location />

You should only use <Location /> if you have no local contents (for  
example
if you are using apache *only* as a proxy).  Otherwise use <Directory>.

> AddOutputFilterByType DEFLATE text/plain

AddOutputFilterByType is problematic.  It won't work in a proxy, and may
not work with dynamic contents.  Use FilterChain & friends, as described
in the mod_filter documentation.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Zip some script?

Posted by Chris Arnold <ca...@electrichendrix.com>.
Yes, i ahve this in /etc/apache/sysconfig.d:
LoadModule mod_deflate			  /usr/lib/apache2-prefork/mod_deflate
and mod_deflate is located in the aboce path. This is in /etc/apache2/default-server:
<Location />
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
AddOutputFilterByType DEFLATE text/html
</Location>
Still get that error in apache2 log.

Chris
----- Original Message -----
From: "Joshua Slive" <jo...@slive.ca>
To: users@httpd.apache.org
Sent: Thursday, August 16, 2007 8:05:22 PM (GMT-0500) America/New_York
Subject: Re: [users@httpd] Zip some script?

On 8/16/07, Chris Arnold <ca...@electrichendrix.com> wrote:
> Humm, i get this in the apache error log:
> [Thu Aug 16 17:29:21 2007] [error] an unknown filter was not added: DEFLATE
> So, i don't think i have mod_deflate working right.

This means mod_deflate probably isn't loaded. Do you have the
appropriate LoadModule line?

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Zip some script?

Posted by Joshua Slive <jo...@slive.ca>.
On 8/16/07, Chris Arnold <ca...@electrichendrix.com> wrote:
> Humm, i get this in the apache error log:
> [Thu Aug 16 17:29:21 2007] [error] an unknown filter was not added: DEFLATE
> So, i don't think i have mod_deflate working right.

This means mod_deflate probably isn't loaded. Do you have the
appropriate LoadModule line?

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Zip some script?

Posted by Chris Arnold <ca...@electrichendrix.com>.
Humm, i get this in the apache error log:
[Thu Aug 16 17:29:21 2007] [error] an unknown filter was not added: DEFLATE
So, i don't think i have mod_deflate working right.

Chris

----- Original Message -----
From: "Joshua Slive" <jo...@slive.ca>
To: users@httpd.apache.org
Sent: Tuesday, August 14, 2007 6:28:41 PM (GMT-0500) America/New_York
Subject: Re: [users@httpd] Zip some script?

On 8/14/07, Chris Arnold <ca...@electrichendrix.com> wrote:
> Joshua Slive wrote:
> >
> > Look at the response headers when requesting a URL. For example, see:
> > http://wiki.apache.org/httpd/WatchingHttpHeaders
> >
> >
> >
> >
> I get this no matter what file or dir i try:
> HEAD /srv/www/htdocs/phpinfo.php
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

You didn't follow the instructions at the above page. You need the
protocol information after the path requested or you're making an
HTTP/0.9 request which can't possibly gzip. You'll also need to
manually include an "Accept-Encoding: gzip" header.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Zip some script?

Posted by Joshua Slive <jo...@slive.ca>.
On 8/14/07, Chris Arnold <ca...@electrichendrix.com> wrote:
> Joshua Slive wrote:
> >
> > Look at the response headers when requesting a URL. For example, see:
> > http://wiki.apache.org/httpd/WatchingHttpHeaders
> >
> >
> >
> >
> I get this no matter what file or dir i try:
> HEAD /srv/www/htdocs/phpinfo.php
> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

You didn't follow the instructions at the above page. You need the
protocol information after the path requested or you're making an
HTTP/0.9 request which can't possibly gzip. You'll also need to
manually include an "Accept-Encoding: gzip" header.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Zip some script?

Posted by Chris Arnold <ca...@electrichendrix.com>.
Joshua Slive wrote:
>
> Look at the response headers when requesting a URL. For example, see:
> http://wiki.apache.org/httpd/WatchingHttpHeaders
>
>
>
>   
I get this no matter what file or dir i try:
HEAD /srv/www/htdocs/phpinfo.php
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<hr>
<address>Apache/2.2.3 (Linux/SUSE) Server at host Port 80</address>
</body></html>
Connection closed by foreign host.

HEAD /photos/phpinfo.php
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<hr>
<address>Apache/2.2.3 (Linux/SUSE) Server at host Port 80</address>
</body></html>
Connection closed by foreign host.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Zip some script?

Posted by Joshua Slive <jo...@slive.ca>.
On 8/14/07, Chris Arnold <ca...@electrichendrix.com> wrote:

> I put the above lines with <Location> in the default-server.conf file. A
> stop and then a restart did not reveal any errors. Is there a way to
> tell if mod_deflate is working?

Look at the response headers when requesting a URL. For example, see:
http://wiki.apache.org/httpd/WatchingHttpHeaders

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Zip some script?

Posted by Chris Arnold <ca...@electrichendrix.com>.
Chris Arnold wrote:
> <Location />
> …
> …
> AddOutputFilterByType DEFLATE text/plain
> AddOutputFilterByType DEFLATE text/xml
> AddOutputFilterByType DEFLATE application/xhtml+xml
> AddOutputFilterByType DEFLATE text/css
> AddOutputFilterByType DEFLATE application/xml
> AddOutputFilterByType DEFLATE image/svg+xml
> AddOutputFilterByType DEFLATE application/rss+xml
> AddOutputFilterByType DEFLATE application/atom_xml
> AddOutputFilterByType DEFLATE application/x-javascript
> AddOutputFilterByType DEFLATE application/x-httpd-php
> AddOutputFilterByType DEFLATE application/x-httpd-fastphp
> AddOutputFilterByType DEFLATE application/x-httpd-eruby
> AddOutputFilterByType DEFLATE text/html
> …
> …
>   
I put the above lines with <Location> in the default-server.conf file. A
stop and then a restart did not reveal any errors. Is there a way to
tell if mod_deflate is working?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Zip some script?

Posted by Chris Arnold <ca...@electrichendrix.com>.
Chris Arnold wrote:
> Hello all! I have a site http://www.mytimewithgod.net and this site has
> a bunch of <script>. I have searched the apache site to find
> mod_deflate. I believe this is what i want to use to "condense" all the
> script. So, according to
> http://httpd.apache.org/docs/2.0/mod/mod_deflate.html i should install
> mod_deflate and configure. Is it really that easy? Any things i should
> watch out for? Using SLES10 SP1 and apache2 2.2.3. Thanks
>
>   
OK, mod_deflate is installed and i have modified loadmodule.conf to load
the deflate module. Now i am trying to find what file gets modified for:
<Location />
…
…
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
AddOutputFilterByType DEFLATE text/html
…
…

Where do i find the <Location> tags in apache2 2.2.3?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org