diff options
author | Donny Davies <woodchip@gentoo.org> | 2002-04-09 23:57:52 +0000 |
---|---|---|
committer | Donny Davies <woodchip@gentoo.org> | 2002-04-09 23:57:52 +0000 |
commit | c88ee90f2a8f77b791713e30678756ecb1336b43 (patch) | |
tree | 756568f730f9c4a1cf87db5489e054dee3ef7c71 /net-www/mod_gzip | |
parent | rewritten apache package; see changelog (diff) | |
download | historical-c88ee90f2a8f77b791713e30678756ecb1336b43.tar.gz historical-c88ee90f2a8f77b791713e30678756ecb1336b43.tar.bz2 historical-c88ee90f2a8f77b791713e30678756ecb1336b43.zip |
add a healthy selection of third-party modules to go along with the great apache rewrite ;)
Diffstat (limited to 'net-www/mod_gzip')
-rw-r--r-- | net-www/mod_gzip/ChangeLog | 9 | ||||
-rw-r--r-- | net-www/mod_gzip/files/changes.txt | 192 | ||||
-rw-r--r-- | net-www/mod_gzip/files/commands.txt | 262 | ||||
-rw-r--r-- | net-www/mod_gzip/files/digest-mod_gzip-1.3.19.1a | 1 | ||||
-rw-r--r-- | net-www/mod_gzip/files/mod_gzip.conf | 27 | ||||
-rw-r--r-- | net-www/mod_gzip/mod_gzip-1.3.19.1a.ebuild | 49 |
6 files changed, 540 insertions, 0 deletions
diff --git a/net-www/mod_gzip/ChangeLog b/net-www/mod_gzip/ChangeLog new file mode 100644 index 000000000000..a58e8982612d --- /dev/null +++ b/net-www/mod_gzip/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for net-www/mod_dav +# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL +# $Header: /var/cvsroot/gentoo-x86/net-www/mod_gzip/ChangeLog,v 1.1 2002/04/09 23:57:52 woodchip Exp $ + +*mod_dav-1.0.3 (9 Apr 2002) + + 9 Apr 2002; Donny Davies <woodchip@gentoo.org> : + + New package to go along with the rewritten apache ebuild. diff --git a/net-www/mod_gzip/files/changes.txt b/net-www/mod_gzip/files/changes.txt new file mode 100644 index 000000000000..9dc4335950d7 --- /dev/null +++ b/net-www/mod_gzip/files/changes.txt @@ -0,0 +1,192 @@ + +CHANGES in Version 1.3.19.1a + +* mod_gzip_can_negotiate Yes + +This new httpd.conf directive is probably the most +important new feature. + +If 'mod_gzip_can_negotiate' command is set to 'Yes' +then mod_gzip will essentially 'take over' some of +the duties of mod_negotiate and will automatically +check for static pre-existing compressed versions +of requested file(s). + +In other words... if the user requests 'filename.html' +and there happens to already be a pre-compressed +version of that page named 'filename.html.gz' then +mod_gzip will immediately return the pre-compressed +version rather than perform a dynamic compression +of the file. + +The delivery of the pre-compressed version of the file +is still subject to the same 'rules' that govern the +delivery of compressed data to a user-agent. The user-agent +must have indicated it is capable of receiving compressed +content and the file/mime type itself must be one of the +valid mod_gzip 'inclusion' items specified using the +normal mod_gzip_item_include/exclude statements. + +The 'mod_negotiate' module for Apache does not currently +have the 'smarts' that mod_gzip does with regards to +evaluating user-agents and inbound request headers and while it +is (sometimes) able to 'negotiate' for static compressed versions +of files it does not have anything comparable to the safety checks +or the include/exclude item filtering logic that mod_gzip has. + +It is much 'safer' to set the 'mod_gzip_can_negotiate' +flag to 'Yes' and let mod_gzip check for ( and deliver ) +static compressed versions of files than it is to let +mod_negotiate make the same decisions. + +If mod_gzip finds a pre-compressed version of a requested +file and all the filtering and safety checks allow that +static compressed version to be delivered back to the +client then the mod_gzip 'result' string in the access.log +file will be... + +mod_gzip: DECLINED:STATIC_GZ_FOUND + +In this case... 'DECLINED' does not mean that no compressed +data was returned. It means that mod_gzip has screened the +request according to its filtering logic and has concluded +that is is OK for Apache itself to flow the pre-compressed +version back to the user-agent. 'DECLINED' means it was +not 'dynamically' compressed and 'STATIC_GZ_FOUND' means +a pre-compressed version was returned to the user-agent. + +In the cases where a user-agent has specifically requested +a filename.html.gz file then the result string will be... + +mod_gzip: DECLINED:FEXT_GZ + +Which means that mod_gzip simply 'passed' on the transaction. + + +* 'mod_gzip_command_version' directive has returned. + +The mod_gzip 'command' interface is back but now it +has a different 'twist'. For security reasons you must +now specify yourself what the 'command' is for certain +functions like 'Get version'. + +This way... only you will know what the command is so +you can test your own site(s). The command(s) can be +different strings for each Virtual Host, if desired. + +To enable mod_gzip to do the 'version' command just +add this to your httpd.conf file... + +mod_gzip_command_version mod_gzip_show_version + +The 'mod_gzip_show_version' string can be anything you +like and this is the 'command' that you can now send +to your server to have it respond with mod_gzip version +information as an HTML response page. + +Example: Using the above command definition all you have +to do to get the Server to provide the mod_gzip version +information ( and whether or not mod_gzip is enabled +for that location ) is type this into your browser... + +http://www.your_server_name.com/mod_gzip_show_version + +If you have added the 'mod_gzip_command_version' config +parameter to 'your_server_name' httpd.conf file then +you will not get a '404 File not found'... you will get this... + +mod_gzip is available on this Server... +mod_gzip_version = 1.3.19.1a +mod_gzip_on = Yes + +If mod_gzip is installed but is not 'on' for whatever +location is requested ( based on Virtual Server name ) +then this will also be indicated with 'mod_gzip_on = No' +in the response. + +This is a good way to tell 3 things... + +1. Is mod_gzip installed and functioning correctly. +2. What version is it? +3. Is mod_gzip turned 'on' for the requested 'location' (Server)? + +The command interface will check the entire URI for the +command pickup string so, if you desire, you can do this +as well... + +http://www.your_server_name.com/dummypage.html?mod_gzip_show_version + +The command string does not have to be part of the URI filename +and can be included as a query parm following any filename. +You will not receive the file... you will get the mod_gzip +command result page instead. + +This might work better for some who want to add the 'command' +link to existing pages since, if mod_gzip is not installed +on 'your_server_name', Apache will still try to locate and +return the page called 'dummypage.html' which might be better +for some scenarios than a '404 Not found' response. + + +* New 'uri' include/exclude record type added... + +The existing 'type' names for inclusion/exclusion should +be adequate for just about anything but one or two +scenarios involving complicated uses of 'ScriptAlias' +have surfaced which could probably benefit from doing +a keyword lookup on the URI itself and not the filename +or mime type. + +To that end there is now a new 'type' name that can used... + +mod_gzip_item_include uri .*foo.* + +This will cause all requests for URIs with the characters 'foo' +in it to be 'included'. + +NOTE: You can use either 'uri' or 'url' as the record type name. + +Using the 'file' pickup type is still the best ( and most accurate ) +thing to do so using the new 'uri' pickup is 'swim at your own risk'. +It should work fine if used properly. + + +* In-memory compression option is back on. + +The 'in-memory' compression option which was temporarily +disabled in the prior version is now back on. The +'mod_gzip_maximum_inmem_size xxxx' config parameter is +what sets the maximum size of a source object ( in bytes ) +that can/will be compressed completely in memory. + +If the 'mod_gzip_maximum_inmem_size' value is either +ZERO or not specified then the 'in-memory' compression +option is effectively disabled and will not be used. + +Due to one remaining problem with some OS'es being unable +to use allocations greater than 64k the maximum value +is limited to 60,000 bytes ( allowing for some overspill ). + +60,000 bytes is perfectly adequate for most responses. +Anything larger than that probably SHOULD use a workfile. + +Next version will allow any size to be used but be forewarned +that testing has already shown that on a busy Server anything +over 60k should probably not use the 'in-memory' option anyway +since a busy Server needs all the memory it can get spread across +hundreds of transactions per second to keep the performance up. + + +* mod_gzip_item_include/exclude description updated. + +Used to report... +ARG1=[mime,file,handler,agent] + +Now correctly reports... +ARG1=[mime,file,uri,handler,reqheader,rspheader] + + +END OF FILE + + + diff --git a/net-www/mod_gzip/files/commands.txt b/net-www/mod_gzip/files/commands.txt new file mode 100644 index 000000000000..cbb327803857 --- /dev/null +++ b/net-www/mod_gzip/files/commands.txt @@ -0,0 +1,262 @@ + +* MOD_GZIP APACHE CONFIGURATION DIRECTIVES + +NOTE: This documentation applies to mod-gzip +version(s) 1.3.19.1a ( and above ). + +* HOW TO ADD MOD_GZIP INFORMATION TO YOUR APACHE LOG FILES + +mod_gzip uses the existing Apache 'notes' method to allow you +to add information to your existing Apache access.log file(s). + +The following special 'LogFormat' will show only the compression +rate achieved. If a file as not compressed a 'dash' or a ZERO +will print instead of the number... + +LogFormat "%h %l %u %t \"%r\" %>s %b +mod_gzip: %{mod_gzip_compression_ratio}npct." +common_with_mod_gzip_info1 + +The following special 'LogFormat' will show all the details +about a compressed file... + +LogFormat "%h %l %u %t \"%r\" %>s %b +mod_gzip: %{mod_gzip_result}n +In:%{mod_gzip_input_size}n +Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct." +common_with_mod_gzip_info2 + +In order to actually use any special 'LogFormat' you must specify +it as a 'CustomLog' entry using the following Apache directive... + +CustomLog logs/access.log common_with_mod_gzip_info2 + +Warning: If you have more than one 'CustomLog' entry defined then +you will get more than 1 log entry for each page requested from +the Server. Unless you desire multiple log entries for each +request then make sure there is only one active 'CustomLog' entry +in your httpd.conf file. + +See the Apache documentation itself for more information about +how to use the 'LogFormat' and 'CustomLog' directives. + + +* MOD_GZIP CONFIGURATION DIRECTIVES + +These are the mod_gzip configuration directives that can be +added to your existing Apache httpd.conf configuration file... + +mod_gzip_on [Yes/No] +Yes=mod_gzip will handle requests. No=mod_gzip is disabled. + +mod_gzip_add_header_count [Yes/No] +Yes=Add header byte counts to Common Log Format output total(s). + +mod_gzip_keep_workfiles [Yes/No] +Yes=Keep any work files used. No=Automatically delete any work files used. +Only set this to 'Yes' for debugging purposes. + +mod_gzip_dechunk [Yes/No] +Yes=Allow removal of 'Transfer-encoding: chunked' when necessary. +Certain 'Back-end' CGI processors such as PHP4 and ColdFusion are +always returning responses using 'Transfer-Encoding: chunked'. +In order for these responses to be compressed you should set this +directive to 'Yes' which will allow mod_gzip to remove the +'Transfer-Encoding: chunked' if/when it is necessary to do so. + +mod_gzip_min_http [ 1000 or 1001 or ???? ] +Minimum HTTP protocol value to support. 1000 = HTTP/1.0 1001 = HTTP/1.1 +If a browser or User-Agent does not report itself as being capable +of doing the 'minimum' HTTP level then no compression will be sent. +The directive uses the same 'numeric' protocol numbers used internally +by Apache itself. + +mod_gzip_minimum_file_size [bytes] +Minimum size ( bytes ) of a file eligible for compression. + +mod_gzip_maximum_file_size [bytes] +Maximum size ( bytes ) of a file eligible for compression. + +mod_gzip_maximum_inmem_size [bytes] +Maximum size ( bytes ) to use for in-memory compression. + + +mod_gzip_temp_dir [Win32=c:\pathname UNIX=/pathname] + +The directory to use for work files and compression cache. + +The directory must already exist and have the correct +read/write permissions for the user/group name(s) used by +the Server while it is running. + +Do not add a slash to the end of the directory pathname. + +If not specifed, the default for Windows is "c:\temp" and the +default for UNIX is "/tmp". + +mod_gzip_item_include ARG1 ARG2 +ARG1=[mime,handler,file,uri,reqheader,rspheader] +ARG2=[Name of item to INCLUDE in list of things that should be compressed] + +mod_gzip_item_exclude ARG1 ARG2 +ARG1=[mime,handler,file,uri,reqheader,rspheader] +ARG2=[Name of item to EXCLUDE from list of things that should be compressed] + +mod_gzip_command_version [string] +User defined pickup string to use for mod_gzip version command. + +mod_gzip_can_negotiate [Yes/No] +Yes=Negotiate/send static compressed versions of files No=Do not negotiate. + + +The following commands are no longer supported... + +mod_gzip_add_vinfo +mod_gzip_do_static_files +mod_gzip_do_cgi +mod_gzip_verbose_debug +mod_gzip_post_on + + +* USING MOD_INFO TO SEE ALL APACHE MODULE CONFIGURATION DIRECTIVES... + +You can always simply 'ask' any Apache Web Server to show you all +the modules installed and print a list of all the directives +available for each module. + +"mod_info" is the Apache standard module that supplies the information. + +This is a text based reprint of the Apache documentation +page for mod_info taken from a copy of Apache 1.3.12.. + +[snip] + +Apache HTTP Server Version 1.3 + +Module mod_info + +This module is contained in the mod_info.c file. +It provides a comprehensive overview of the server configuration +including all installed modules and directives in the +configuration files. + +This module is not compiled into the server by default. + +It is only available in Apache 1.1 and later. + +To enable it, add the following line to the server build +Configuration file, and rebuild the server: + +AddModule modules/standard/mod_info.o + +To configure it, add the following to your access.conf file. + +<Location /server-info> +SetHandler server-info +</Location> + +You may wish to add a <Limit> clause inside the location directive +to limit access to your server configuration information. + +Once configured, the server information is obtained by accessing + +http://your.host.dom/server-info + +Note that the configuration files are read by the module at run-time, +and therefore the display may not reflect the running server's active +configuration if the files have been changed since the server was last +reloaded. Also, the configuration files must be readable by the user +as which the server is running (see the User directive), or else the +directive settings will not be listed. + +It should also be noted that if mod_info is compiled into the server, +its handler capability is available in all configuration files, +including per-directory files (e.g., .htaccess). +This may have security-related ramifications for your site. + +AddModuleInfo + +Syntax: AddModuleInfo module-name string +Context: server config, virtual host +Status: base +Module: mod_browser +Compatibility: Apache 1.3 and above + +This allows the content of string to be shown as HTML interpreted, +Additional Information for the module module-name. Example: + +AddModuleInfo mod_auth.c +'See <A HREF="http://www.apache.org/docs/mod/mod_auth.html"> +http://www.apache.org/docs/mod/mod_auth.html</A>' + +[snip] + +If both mod_gzip and mod_info are installed and you send the +following request to the Server... + +http://your.host.dom/server-info + +...then this is what you should see in the mod_gzip section +of the report... + +mod_gzip_on +Yes=mod_gzip will handle requests. No=mod_gzip is disabled. + +mod_gzip_add_header_count +Yes=Add header byte counts to Common Log Format output total(s). + +mod_gzip_keep_workfiles +Yes=Keep any work files used. No=Automatically delete any work files used. + +mod_gzip_dechunk +Yes=Allow removal of 'Transfer-encoding: chunked' when necessary. + +mod_gzip_min_http +Minimum HTTP protocol value to support. 1000 = HTTP/1.0 1001 = HTTP/1.1 + +mod_gzip_minimum_file_size +Minimum size ( bytes ) of a file eligible for compression. + +mod_gzip_maximum_file_size +Maximum size ( bytes ) of a file eligible for compression. + +mod_gzip_maximum_inmem_size +Maximum size ( bytes ) to use for in-memory compression. + +mod_gzip_temp_dir +The directory to use for work files and compression cache. + +mod_gzip_item_include +ARG1=[mime,handler,file,uri,reqheader,rspheader] +ARG2=[Name of item to INCLUDE in list of things that should be compressed] + +mod_gzip_item_exclude +ARG1=[mime,handler,file,uri,reqheader,rspheader] +ARG2=[Name of item to EXCLUDE from list of things that should be compressed] + +mod_gzip_command_version +User defined pickup string to use for mod_gzip version command. + +mod_gzip_can_negotiate +Yes=Negotiate/send static compressed versions of files No=Do not negotiate. + +mod_gzip_add_vinfo +Configuration directive no longer supported. + +mod_gzip_do_static_files +Configuration directive no longer supported. + +mod_gzip_do_cgi +Configuration directive no longer supported. + +mod_gzip_verbose_debug +Configuration directive no longer supported. + +mod_gzip_post_on +Configuration directive no longer supported. + +[snip] + +End of document. + + diff --git a/net-www/mod_gzip/files/digest-mod_gzip-1.3.19.1a b/net-www/mod_gzip/files/digest-mod_gzip-1.3.19.1a new file mode 100644 index 000000000000..4c83e458fecf --- /dev/null +++ b/net-www/mod_gzip/files/digest-mod_gzip-1.3.19.1a @@ -0,0 +1 @@ +MD5 4213af3e9a6cf208fa29b04512ce7c75 mod_gzip.c.gz 55269 diff --git a/net-www/mod_gzip/files/mod_gzip.conf b/net-www/mod_gzip/files/mod_gzip.conf new file mode 100644 index 000000000000..155af97b71f2 --- /dev/null +++ b/net-www/mod_gzip/files/mod_gzip.conf @@ -0,0 +1,27 @@ +<IfModule mod_gzip.c> + +mod_gzip_on Yes +mod_gzip_dechunk Yes +mod_gzip_minimum_file_size 300 +mod_gzip_maximum_file_size 0 +mod_gzip_maximum_inmem_size 100000 +mod_gzip_keep_workfiles No +mod_gzip_temp_dir /tmp +mod_gzip_item_include file \.html$ +mod_gzip_item_include file \.htm$ +mod_gzip_item_include file \.jsp$ +mod_gzip_item_include file \.php$ +mod_gzip_item_include file \.pl$ +mod_gzip_item_include mime ^text/.* +mod_gzip_item_include mime ^application/x-httpd-php +mod_gzip_item_include mime ^httpd/unix-directory$ +mod_gzip_item_include handler ^perl-script$ +mod_gzip_item_include handler ^server-status$ +mod_gzip_item_include handler ^server-info$ +mod_gzip_item_include handler "jserv-servlet" +mod_gzip_item_exclude file \.css$ +mod_gzip_item_exclude file \.js$ +mod_gzip_item_exclude file \.wml$ +mod_gzip_item_exclude mime ^image/.* + +</IfModule> diff --git a/net-www/mod_gzip/mod_gzip-1.3.19.1a.ebuild b/net-www/mod_gzip/mod_gzip-1.3.19.1a.ebuild new file mode 100644 index 000000000000..9093f9451b81 --- /dev/null +++ b/net-www/mod_gzip/mod_gzip-1.3.19.1a.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Maintainer: Donny Davies <woodchip@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/net-www/mod_gzip/mod_gzip-1.3.19.1a.ebuild,v 1.1 2002/04/09 23:57:52 woodchip Exp $ + +DESCRIPTION="Apache module which acts as an Internet Content Accelerator" +HOMEPAGE="http://www.remotecommunications.com/apache/mod_gzip/" + +S=${WORKDIR}/${P} +SRC_URI="http://www.remotecommunications.com/apache/${PN}/src/${PV}/${PN}.c.gz" + +DEPEND="virtual/glibc >=net-www/apache-1.3.24 >=sys-libs/zlib-1.1.4" + +src_unpack() { + mkdir ${P} ; cd ${S} + cp ${DISTDIR}/${A} . + gunzip ${A} || die +} + +src_compile() { + /usr/sbin/apxs -I/usr/include -L/usr/lib -lz -c mod_gzip.c + assert "compile problem" +} + +src_install() { + exeinto /usr/lib/apache-extramodules + doexe mod_gzip.so + + dodoc ${FILESDIR}/{changes,commands}.txt + + insinto /etc/apache/conf/addon-modules + doins ${FILESDIR}/mod_gzip.conf +} + +pkg_postinst() { + einfo + einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config" + einfo "to have your apache.conf auto-updated for use with this module." + einfo "You should then edit your /etc/conf.d/apache file to suit." + einfo +} + +pkg_config() { + ${ROOT}/usr/sbin/apacheaddmod \ + ${ROOT}/etc/apache/conf/apache.conf \ + extramodules/mod_gzip.so mod_gzip.c gzip_module \ + define=GZIP addconf=conf/addon-modules/mod_gzip.conf + :; +} |