[root@filedb2.test /var/httpd/conf]$ cat httpd_filedb.conf
PidFile run/filedb.pid
Include conf/httpd_common.conf
Include conf/mod_gzip.conf
MinSpareServers 10
MaxSpareServers 50
StartServers 100
MaxClients 225
NameVirtualHost *:80
Listen *:80
#LoadModule jk_module modules/mod_jk.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
#JkWorkersFile jk/workers.properties
Options All
Order Allow,Deny
Allow from all
Header set Cache-Control "max-age=604800"
Header set Cache-Control "max-age=604800"
Header set Cache-Control "max-age=604800"
ServerName filedb.experts-exchange.com
ServerAdmin brian@experts-exchange.com
DocumentRoot /var/ee/www
# ErrorLog "|/usr/sbin/cronolog -u httpsd -g httpsd -S /var/httpd/logs/www/error_log /var/httpd/logs/www/error_log.%Y%m%d"
### Create hourly logs for webtrends/log_archiver
# CustomLog "|/usr/sbin/cronolog -u httpsd -g httpsd -S /var/httpd/logs/www/access_log /var/httpd/logs/www/access_log.%Y%m%d_%H -r /usr/bin/logWaiting.sh" combined
# Include conf/search_rewrite_rules.conf
#RewriteRule (^.*\.jsp$) http://127.0.0.1:8079$1?SCRIPT_URL=%{REQUEST_URI} [P,QSA]
ErrorDocument 500 /down.html
ErrorDocument 502 /down.html
ErrorDocument 503 /down.html
ProxyIOBufferSize 1048576
# JkEnvVar SCRIPT_URL SCRIPT_URL
# JkMount /*.jsp search
# allows file access to ftp site
#
Alias /incoming "/home/ftp/pub/incoming"
RewriteLog "/var/httpd/logs/rewrite_log"
RewriteLogLevel 4
Options All
# Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
RewriteEngine On
RewriteBase /incoming
RewriteRule ^([0-9]{4})_([0-9]{2}_w[0-9]{2})/([^/]+)$ $1/$2/$3 [R,L]
[root@filedb2.test /var/httpd/conf]$
[root@filedb2.test /var/httpd/conf]$ cat httpd_common.conf
ServerType standalone
ServerRoot "/var/httpd"
ScoreBoardFile logs/httpd.scoreboard
Timeout 300
KeepAlive On
#MaxKeepAliveRequests 200
#KeepAliveTimeout 15
# Tuned for mod_dosevasive
MaxKeepAliveRequests 10000
KeepAliveTimeout 3
#LoadModule dosevasive_module modules/mod_dosevasive.so
#
#
# DOSHashTableSize 3097
# DOSPageCount 50
# DOSPageInterval 1
# DOSSiteCount 100
# DOSSiteInterval 1
# DOSBlockingPeriod 10
# DOSEmailNotify brian@experts-exchange.com
# DOSSystemCommand 'echo "NOTICE: DOS attack detected from %s" >> /var/log/messages'
#
CoreDumpDirectory logs/core
#LoadModule env_module modules/mod_env.so
#LoadModule config_log_module modules/mod_log_config.so
#LoadModule mime_module modules/mod_mime.so
#LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule status_module modules/mod_status.so
#LoadModule includes_module modules/mod_include.so
#LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule dir_module modules/mod_dir.so
#LoadModule cgi_module modules/mod_cgi.so
#LoadModule asis_module modules/mod_asis.so
#LoadModule imap_module modules/mod_imap.so
#LoadModule action_module modules/mod_actions.so
#LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
#LoadModule access_module modules/mod_access.so
#LoadModule auth_module modules/mod_auth.so
#LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule jk_module modules/mod_jk.so
#LoadModule rewrite_module modules/mod_rewrite.so
ServerAdmin admin@experts-exchange.com
User httpsd
Group httpsd
### SECURITY RISK
# Options FollowSymLinks
Options None
AllowOverride None
# Order Deny,Allow
Order Allow,Deny
Allow from all
# Deny from all
AccessFileName .htaccess
Order allow,deny
Deny from all
Satisfy All
UseCanonicalName Off
ServerSignature Off
ServerTokens Prod
TypesConfig conf/mime.types
#DefaultType text/plain
#HostnameLookups On
HostnameLookups Off
LogLevel debug
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n -< Out:%{mod_gzip_output_size}n = %{mod_gzip_compression_ratio}n pct." combined_with_gzip
ErrorLog logs/error_log
CustomLog logs/access_log combined
#ErrorLog "|/usr/sbin/cronolog -u httpsd -g httpsd -S /var/httpd/logs/server/error_log /var/httpd/logs/server/error_log.%Y%m%d"
#CustomLog "|/usr/sbin/cronolog -u httpsd -g httpsd -S /var/httpd/logs/server/access_log /var/backup/httpd/logs/server/access_log.%Y%m%d" combined
#
# Document types.
#
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
AddLanguage da .dk
AddLanguage nl .nl
AddLanguage en .en
AddLanguage et .ee
AddLanguage fr .fr
AddLanguage de .de
AddLanguage el .el
AddLanguage he .he
AddCharset ISO-8859-8 .iso8859-8
AddLanguage it .it
AddLanguage ja .ja
AddCharset ISO-2022-JP .jis
AddLanguage kr .kr
AddCharset ISO-2022-KR .iso-kr
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddCharset ISO-8859-2 .iso-pl
AddLanguage pt .pt
AddLanguage pt-br .pt-br
AddLanguage ltz .lu
AddLanguage ca .ca
AddLanguage es .es
AddLanguage sv .se
AddLanguage cz .cz
AddLanguage ru .ru
AddLanguage zh-tw .tw
AddLanguage tw .tw
AddCharset Big5 .Big5 .big5
AddCharset WINDOWS-1251 .cp-1251
AddCharset CP866 .cp866
AddCharset ISO-8859-5 .iso-ru
AddCharset KOI8-R .koi8-r
AddCharset UCS-2 .ucs2
AddCharset UCS-4 .ucs4
AddCharset UTF-8 .utf8
LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
DirectoryIndex index.html index.jsp General.htm
[root@filedb2.test /var/httpd/conf]$
[root@filedb2.test /var/httpd/conf]$ cat mod_gzip.conf
#######################################
### Apache configuration directives ###
### for mod_gzip 1.3.26.1a ###
#######################################
##########################
### loading the module ###
##########################
# ---------------------------------------------------------------------
# load DLL / Win32:
# LoadModule gzip_module modules/ApacheModuleGzip.dll
#
# load DSO / UNIX:
LoadModule gzip_module modules/mod_gzip.so
#
# (none of both if module has been compiled in statically;
# the exact file name may depend upon the exact compilation method used
# for this module)
# ---------------------------------------------------------------------
########################
### responsibilities ###
########################
# ---------------------------------------------------------------------
# use mod_gzip at all?
mod_gzip_on Yes
# (you can especially enable mod_gzip inside the central server
# configuration but disable it inside some directories ot virtual
# hosts by using this directive.)
# ---------------------------------------------------------------------
######################################
### statically precompressed files ###
######################################
# ---------------------------------------------------------------------
# let mod_gzip perform 'partial content negotiation'?
mod_gzip_can_negotiate Yes
# (if this option is active and a static file is to be served in com-
# pressed for, then mod_gzip will look for a static precompressed
# version of this file with a defined additional extension - see next
# directive - which would be delivered with priority. This would allow
# for avoiding to repeatedly compress the same static file and thus
# saving CPU time.
# No dynamic caching of this file is provided; currently the user
# himself is responsible for creating and updating the precompressed
# file's content.
# From version 1.3.19.2a mod_gzip automatically recognizes whether
# a statically precompressed file is older than its uncompressed
# original and in this case will serve the content of the original
# file in uncompressed form - as to rather serve correct data than
# outdated ones ...)
# ---------------------------------------------------------------------
# extension (suffix) for statically precompressed files
mod_gzip_static_suffix .gz
AddEncoding gzip .gz
# (effect: see previous directive; this string will be appended to the
# name of the original file.
# be sure to configure the encoding 'gzip' for this extension as well,
# because mod_gzip doesn't serve the content itself but simply generates
# an Apache internal redirection to this URL. Therefore the remaining
# Apache configuration is responsible for setting the 'Content-Encoding'
# header properly ...
# prior to version 1.3.19.2a this value was not configurable.)
# ---------------------------------------------------------------------
# automatic updates for statically precompressed files
mod_gzip_update_static No
# (if set to 'Yes', this directive (being new in version 1.3.26.1a) would
# cause mod_gzip to automatically update an outdated version of any
# statically precompressed file during the request, i. e. compress the
# originally requested file and overwrite the precompressed variant
# file with it!
# for each automatic update of this type, mod_gzip will write a message
# of the severity 'notice' into the Apache error_log.
# while doing so, mod_gzip will directly read the original file's content.
# therefore this content cannot be interpreted by any other Apache module
# during the request. this might possibly not be what you want - hopefully
# it will be what most users want, because it works fast this way.
# use this configuration with a lot of care, and be sure that you don't
# inadvertantly cause valuable files within the URL tree to be overwritten.
# this isn't a feature to be used for mass hosting servers, especially
# because mod_gzip might experience access control problems there - the
# userid the Apache processes are running under need to have write access
# to the precompressed files of all users, which may not automatically be
# the case.)
# ---------------------------------------------------------------------
###################
### bureaucracy ###
###################
# ---------------------------------------------------------------------
# display status for mod_gzip
mod_gzip_command_version '/mod_gzip_status'
# (defines an URL to display the status of mod_gzip; can be specified
# individually for each installation and protected against access via
# section for privacy reasons)
# ---------------------------------------------------------------------
# The status display will look like this:
# mod_gzip is available...
# mod_gzip_version = 1.3.26.1a
# mod_gzip_on = Yes/No
# and thus will provide information about
# - mod_gzip being installed at the server and working correctly,
# - which version has been installed and
# - whether mod_gzip has been set 'active' for this Location
# (-> mod_gzip_on)
# ---------------------------------------------------------------------
#######################
### data management ###
#######################
# ---------------------------------------------------------------------
# Working directory for temporary files and the compression cache
# if not specified, the following default values are used:
# [Win32=c:\temp], [UNIX=/tmp]
# mod_gzip_temp_dir /tmp
# (This directory must already exist and the userid being used for
# running the Apache server must have read and write access to this
# directory.
# Unlike other Apache directives an absolute path name must be specified
# here; a relative value will not be interpreted relatively to ServerRoot.
# This pastname must NOT be terminated with '/'.
# For maximum performance this directory should be located on a RAM disk,
# if the file system isn't already being cached efficiently
# ---------------------------------------------------------------------
# Save temporary work files [Yes, No]
mod_gzip_keep_workfiles No
# (one file per HTTP request - set to 'yes' for debugging purpose only!)
# ---------------------------------------------------------------------
##################
### file sizes ###
##################
# ---------------------------------------------------------------------
# minimum size (in bytes) for files to be compressed
mod_gzip_minimum_file_size 500
# (for very small files compression will produce only small absolute gains
# [you will still save about 50% of the content, but some additional
# 500 bytes of HTTP and TCP headers will always remain uncompressed],
# but still produce CPU load for both client and server)
# ---------------------------------------------------------------------
# maximum size (in bytes) for files to be compressed
#mod_gzip_maximum_file_size 500000
mod_gzip_maximum_file_size 10485760
#(10 Megs)
# (for very large files compression may eventually take rather long and
# thus delay the start of the transmission.
# Furthermode a limitation at this point prevents the server from
# producing output of unlimited size in case of some endless loop
# inside a CGI script - or even trying to compress streaming data -
# which might otherwise cause the creation of a temporary file of
# any size and even fill up the whole hard disk.
# On the other hand, compression will have a much more perceivable
# subjective effect for large files ... so be sure to fine-tune this
# according to your requirements.)
# ---------------------------------------------------------------------
# maximum size (in bytes) for files to be compressed in memory
#mod_gzip_maximum_inmem_size 60000
mod_gzip_maximum_inmem_size 131072
#(128k)
# (larger files will be compressed into the temp file directory; adapt
# this value to your server's available main memory.
# In mod_gzip 1.3.19.x larger values will automatically be limited to
# 60000 because some operating systems are said to have problems
# allocating more than 64 kb of memory at a time.
# ---------------------------------------------------------------------
####################
### requirements ###
####################
# (see chapter about caching for problems when using these directives.)
# ---------------------------------------------------------------------
# Required HTTP version of the client
# Possible values: 1000 = HTTP/1.0, 1001 = HTTP/1.1, ...
# This directive uses the same numeric protocol values as Apache does
# internally
mod_gzip_min_http 1000
# (By using this directive you may exclude old browsers, search engines
# etc. from the compression procedure: if the user agent doesn't
# declare itself capable of understanding at least the HTTP level
# specified here, only uncompressed data will be delivered - no matter
# what else it claims to be able to. The value of '1001' will especially
# exclude Netscape 4.x. and a lot of proxy servers.)
# ---------------------------------------------------------------------
# HTTP methods to be handled
# Possible values: 'GET', 'POST' or a list of both values.
mod_gzip_handle_methods GET POST
# (By using this directive you may particularly exclude POST requests
# from the compression procedure. There are known cases where the
# handling of these requests by previous mod_gzip versions could cause
# problems.
# Before version 1.3.19.2a this value was not configurable.)
# ---------------------------------------------------------------------
###############
### filters ###
###############
# ---------------------------------------------------------------------
# which files are to be compressed?
#
# The order of processing during each of both phases is not important,
# but to trigger the compression of a request's content this request
# a) must match at least one include rule in each of both phases and
# b) must not match an exclude rule in any of both phases.
# These rules are not minimal, they are meant to serve as example only.
#
# phase 1: (reqheader, uri, file, handler)
# ========================================
# (see chapter about caching for problems when using 'reqheader' type
# filter rules.)
# NO: special broken browsers which request for gzipped content
# but then aren't able to handle it correctly
mod_gzip_item_exclude reqheader "User-agent: Mozilla/4.0[678]"
# let tomcat handle compression for jsp pages
mod_gzip_item_exclude file \.jsp$
mod_gzip_item_include file \.html$
mod_gzip_item_include file \.js$
mod_gzip_item_include file \.css$
# phase 2: (mime, rspheader)
# ===========================
# YES: normal HTML files, normal text files, Apache directory listings
mod_gzip_item_include mime ^text/.*$
mod_gzip_item_include mime ^httpd/unix-directory$
mod_gzip_item_include mime ^application/x-javascript$
#
# NO: images (GIF etc., will rarely ever save anything)
mod_gzip_item_exclude mime ^image/
# ---------------------------------------------------------------------
# In fact mod_gzip is checking only the first 4 characters of the 1st
# operand (in case of uri even the first 2 characters only, as to
# allow for values like url).
# ---------------------------------------------------------------------
# The table for mod_gzip_item rules (include and exclude) cannot contain
# more than 256 entries; when this number is exceeded mod_gzip will
# output the message "mod_gzip: ERROR: Item index is full"
# and report a configuration error to the Apache server.
# ---------------------------------------------------------------------
# The directive values described here are meant to describe the requests
# elected for compression most exactly.
# Especially for the mime rules it has to be made clear that the HTTP
# header 'Content-Type' (that will be checked by mod_gzip for this rule)
# in some cases may contain not only a MIME type but additionally a
# character set description (charset) as well.
# If this is the case for the requests to be handled then you need to
# remove the '$' char at the end of the corresponding value so that now
# only the prefix of this value will be tested for matching.
# ---------------------------------------------------------------------
##########################
### transfer encodings ###
##########################
# ---------------------------------------------------------------------
# Allow mod_gzip to eliminate the HTTP header
# 'Transfer-encoding: chunked'
# and join the chunks to one (compressable) packet
mod_gzip_dechunk Yes
# (this is required for handling several types of dynamically generated
# contents, especially for CGI and SSI pages, but also for pages produced
# by some Java Servlet interpreters.
# ---------------------------------------------------------------------
###############
### logging ###
###############
# ---------------------------------------------------------------------
# Extended log format (for testing the compression effect)
#LogFormat "%h %l %u %t \"%V %r\" %
[root@filedb2.test /var/httpd/conf]$