HELP - Gzip (Mod_Gzip)
Author:
jane
03 10th, 2010 in
enart.abczj.com
edit
I have been trying to configure my server to run with gzip and everytime I enter the details in the config file and restart apache it says "apache cannot restart server" or some words like it.
This is my php file:
http://www.skytronic-forums.com/phpinfo
trying to get forum to load faster.
Duron 1Gb processor,
512MB ram,
Linux 7.1,
plesk 2.0,
PHP Version 4.0.6,
mysql version 3.23.36.
Any pointers?
Brian
:confused:
make sure you load the module
LoadModule gzip_module modules/mod_gzip.so
then
AddModule mod_gzip.c
make sure ther rest of your conf is good to go
## mod_gzip settings ##
mod_gzip_on Yes
mod_gzip_can_negotiate Yes
mod_gzip_dechunk Yes
mod_gzip_keep_workfiles No
# Exclude non http1.1 compliant browsers 1000=HTTP/1.0 1001=HTTP
/1.1
mod_gzip_min_http 1001
# Where to put work files
mod_gzip_temp_dir /tmp
# file size thresholds
mod_gzip_minimum_file_size 250
mod_gzip_maximum_file_size 300000
mod_gzip_maximum_inmem_size 300000
# File types
mod_gzip_item_include file .htm$
mod_gzip_item_include file .html$
mod_gzip_item_include file .pl$
mod_gzip_item_include file .cgi$
mod_gzip_item_include file .asp$
mod_gzip_item_include file .php$
mod_gzip_item_include file .php3$
mod_gzip_item_include file .php4$
mod_gzip_item_include mime text/.*
mod_gzip_item_include mime ^application/x-httpd-php
mod_gzip_item_include mime ^httpd/unix-directory$
# Standard Netscape Caveats
# tell mod_gzip not to compress stuff sent in a posted form!
# these seem to be specific to my Resin Servlet handler
mod_gzip_item_exclude reqheader Content-Type:application/x-www-form-urle
ncoded
mod_gzip_item_exclude reqheader Content-Type:multipart/form-data
# compressed Cascading Style Sheets definitely don't render in Netscape
4.7x
mod_gzip_item_exclude file .css$
# JavaScript don't compress so good
mod_gzip_item_exclude file ".js$"
# NS 4.07 lies about 1.1 compliance
mod_gzip_item_exclude reqheader User-Agent:.*Mozilla.*4.07
mod_gzip_item_include mime httpd/unix-directory
Here is extracts from my conf file is it correct:
LoadModule expires_module libexec/mod_expires.so
LoadModule headers_module libexec/mod_headers.so
LoadModule usertrack_module libexec/mod_usertrack.so
LoadModule unique_id_module libexec/mod_unique_id.so
LoadModule setenvif_module libexec/mod_setenvif.so
LoadModule gzip_module_module libexec/mod_gzip.so
## mod_gzip settings ##
mod_gzip_on Yes
mod_gzip_can_negotiate Yes
mod_gzip_dechunk Yes
mod_gzip_keep_workfiles No
# Exclude non http1.1 compliant browsers 1000=HTTP/1.0 1001=HTTP
/1.1
mod_gzip_min_http 1001
# Where to put work files
mod_gzip_temp_dir /tmp
# file size thresholds
mod_gzip_minimum_file_size 250
mod_gzip_maximum_file_size 300000
mod_gzip_maximum_inmem_size 300000
# File types
mod_gzip_item_include file .htm$
mod_gzip_item_include file .html$
mod_gzip_item_include file .pl$
mod_gzip_item_include file .cgi$
mod_gzip_item_include file .asp$
mod_gzip_item_include file .php$
mod_gzip_item_include file .php3$
mod_gzip_item_include file .php4$
mod_gzip_item_include mime text/.*
mod_gzip_item_include mime ^application/x-httpd-php
mod_gzip_item_include mime ^httpd/unix-directory$
# Standard Netscape Caveats
# tell mod_gzip not to compress stuff sent in a posted form!
# these seem to be specific to my Resin Servlet handler
mod_gzip_item_exclude reqheader Content-Type:application/x-www-form-urle
ncoded
mod_gzip_item_exclude reqheader Content-Type:multipart/form-data
# compressed Cascading Style Sheets definitely don't render in Netscape
4.7x
mod_gzip_item_exclude file .css$
# JavaScript don't compress so good
mod_gzip_item_exclude file ".js$"
# NS 4.07 lies about 1.1 compliance
mod_gzip_item_exclude reqheader User-Agent:.*Mozilla.*4.07
mod_gzip_item_include mime httpd/unix-directory
Further down:
AddModule mod_usertrack.c
AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
AddModule mod_gzip.c
AddModule mod_ssl.c
AddModule mod_frontpage.c
AddModule mod_php4.c
AddModule mod_throttle.c
AddModule mod_perl.c
Thanks,
Brian :confused:
Why? I never have to build from source ever?
http://i4net.tv/marticle/get.php?action=getarticle&articleid=12
Look for the "Compiling mod_gzip from source code " section and follow those directions....
Within telenet I do a locate and look for apxs, I get this back:
/usr/local/psa/admin/bin/apxs
/usr/local/psa/admin/man/man8/apxs.8
/usr/local/psa/apache/bin/apxs
/usr/local/psa/apache/man/man8/apxs.8
/usr/local/psa/apache/htdocs/manual/programs/apxs.html
I presume my correct directory is:
/usr/local/psa/apache/bin
So I goto this directory and download this file to bin:
wget http://www.remotecommunications.com/apache/mod_gzip/src/1.3.19.1a/mod_gzip.c
I then try to carry on and follow the Instructions and try to run the following command:
apxs -i -a -c mod_gzip.c
I have tried all combinations I.E
/usr/local/psa/admin/bin apxs -i -a -c mod_gzip.c
And regardless what I do it says:
/usr/local/psa/apache/bin/apxs: No such file or directory
or
/usr/local/psa/apache/bin apxs -i -a -c mod_gzip.c
/usr/local/psa/apache/bin: is a directory
What Am I doing wrong?
:confused:
#If you have any other info about this subject , Please add it free.# |