This is a patch based on the Red Hat 7.3 config file patch for Apache 1.3.27 It has been modified from the 1.3.27 patch by Tim Jackson. The ONLY changes are as follows: * Updated to patch against Apache 1.3.29's default config file * Added AddModule/LoadModule commands for PHP5 * 1.3.29's config file removed the (commented) examples related to proxying, so the Red Hat changes to those have also been removed. The comments below are from the original Red Hat patch: All of the changes we make to the standard httpd.conf-dist file, done as a patch rather than a separate file so that tracking changes made to the upstream version is easier. * The logs/ directory is a symlink to /var/log, and lock files and whatnot should really go in /var/run (/var/lock reserved for locking devices). * Turn off keepalive to prevent possible DoS(?). * Increase MaxSpareServers/MinServers/StartServers for performance. * Set MaxRequestsPerChild to a non-infinite value. * Add a commented-out example listening port. * Load modules we're building as DSOs. * Set default user and group to "apache" (NOTE: this must match the .spec file) . * Set ServerAdmin and ServerName using "localhost". * Disable Multiviews in directory listings, and don't truncate filenames (latter requested by support team). * Set up documents to be under the content directory set in the .spec file, to hopefully make it easier to rebuild using the older locations. * Allow scripts and whatnot to be used as directory indexes. * Use the system-wide MIME type file (and a pointer to the system mime-magic). * Enable server-side includes (server-parsed) and image maps. * Place proxy cache under /var/cache. * Allow local users to browse docs. * Comment out the default /manual alias. We actually put the docs in that directory, so it's redundant. * Add MIME types for PHP. * Disable UserDir. --- apache_1.3.29/conf/httpd.conf-dist 2003-07-29 22:04:25.000000000 +0100 +++ apache_1.3.29/conf/httpd.conf-dist 2003-11-03 14:48:20.000000000 +0000 @@ -56,6 +56,8 @@ # (available at ); # you will save yourself a lot of trouble. # +# Do NOT add a slash at the end of the directory path. +# ServerRoot "@@ServerRoot@@" # @@ -67,13 +69,13 @@ # DISK. The PID of the main server process is automatically appended to # the filename. # -#LockFile logs/accept.lock +LockFile /var/run/httpd.lock # # PidFile: The file in which the server should record its process # identification number when it starts. # -PidFile logs/httpd.pid +PidFile /var/run/httpd.pid # # ScoreBoardFile: File used to store internal server process information. @@ -104,7 +106,7 @@ # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # -KeepAlive On +KeepAlive Off # # MaxKeepAliveRequests: The maximum number of requests to allow @@ -133,13 +135,13 @@ # spares die off. The default values are probably OK for most sites. # MinSpareServers 5 -MaxSpareServers 10 +MaxSpareServers 20 # # Number of servers to start initially --- should be a reasonable ballpark # figure. # -StartServers 5 +StartServers 8 # # Limit on total number of servers running, i.e., limit on the number @@ -164,7 +166,7 @@ # an initial request and 10 subsequent "keptalive" requests, it # would only count as 1 request towards this limit. # -MaxRequestsPerChild 0 +MaxRequestsPerChild 1000 # # Listen: Allows you to bind Apache to specific IP addresses and/or @@ -173,6 +175,7 @@ # #Listen 3000 #Listen 12.34.56.78:80 +#Listen 80 # # BindAddress: You can support virtual hosts with this option. This directive @@ -197,7 +200,166 @@ # the order below without expert advice. # # Example: -# LoadModule foo_module libexec/mod_foo.so +# LoadModule foo_module modules/mod_foo.so + +#LoadModule mmap_static_module modules/mod_mmap_static.so +LoadModule vhost_alias_module modules/mod_vhost_alias.so + +LoadModule bandwidth_module modules/mod_bandwidth.so + + +LoadModule throttle_module modules/mod_throttle.so + +LoadModule env_module modules/mod_env.so +LoadModule config_log_module modules/mod_log_config.so +LoadModule agent_log_module modules/mod_log_agent.so +LoadModule referer_log_module modules/mod_log_referer.so +#LoadModule mime_magic_module modules/mod_mime_magic.so +LoadModule mime_module modules/mod_mime.so +LoadModule negotiation_module modules/mod_negotiation.so +LoadModule status_module modules/mod_status.so +LoadModule info_module modules/mod_info.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 speling_module modules/mod_speling.so +LoadModule userdir_module modules/mod_userdir.so +LoadModule alias_module modules/mod_alias.so +LoadModule rewrite_module modules/mod_rewrite.so +LoadModule access_module modules/mod_access.so +LoadModule auth_module modules/mod_auth.so +LoadModule anon_auth_module modules/mod_auth_anon.so +LoadModule db_auth_module modules/mod_auth_db.so +#LoadModule auth_any_module modules/mod_auth_any.so +#LoadModule dbm_auth_module modules/mod_auth_dbm.so +#LoadModule auth_ldap_module modules/mod_auth_ldap.so +#LoadModule mysql_auth_module modules/mod_auth_mysql.so +#LoadModule auth_pgsql_module modules/mod_auth_pgsql.so +#LoadModule digest_module modules/mod_digest.so +#LoadModule proxy_module modules/libproxy.so +#LoadModule cern_meta_module modules/mod_cern_meta.so +LoadModule expires_module modules/mod_expires.so +LoadModule headers_module modules/mod_headers.so +#LoadModule usertrack_module modules/mod_usertrack.so +#LoadModule example_module modules/mod_example.so +#LoadModule unique_id_module modules/mod_unique_id.so +LoadModule setenvif_module modules/mod_setenvif.so + +LoadModule perl_module modules/libperl.so + + +LoadModule php_module modules/mod_php.so + + +LoadModule php3_module modules/libphp3.so + + +LoadModule php4_module modules/libphp4.so + + +LoadModule php5_module modules/libphp5.so + + +LoadModule dav_module modules/libdav.so + + +LoadModule roaming_module modules/mod_roaming.so + + +LoadModule ssl_module modules/libssl.so + + +LoadModule put_module modules/mod_put.so + + +LoadModule python_module modules/mod_python.so + + +# Reconstruction of the complete module list from all available modules +# (static and shared ones) to achieve correct module execution order. +# [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO] +ClearModuleList +#AddModule mod_mmap_static.c +AddModule mod_vhost_alias.c + +AddModule mod_bandwidth.c + + +AddModule mod_throttle.c + +AddModule mod_env.c +AddModule mod_log_config.c +AddModule mod_log_agent.c +AddModule mod_log_referer.c +#AddModule mod_mime_magic.c +AddModule mod_mime.c +AddModule mod_negotiation.c +AddModule mod_status.c +AddModule mod_info.c +AddModule mod_include.c +AddModule mod_autoindex.c +AddModule mod_dir.c +AddModule mod_cgi.c +AddModule mod_asis.c +AddModule mod_imap.c +AddModule mod_actions.c +#AddModule mod_speling.c +AddModule mod_userdir.c +AddModule mod_alias.c +AddModule mod_rewrite.c +AddModule mod_access.c +AddModule mod_auth.c +AddModule mod_auth_anon.c +AddModule mod_auth_db.c +#AddModule mod_auth_any.c +#AddModule mod_auth_dbm.c +#AddModule auth_ldap.c +#AddModule mod_auth_mysql.c +#AddModule mod_auth_pgsql.c +#AddModule mod_digest.c +#AddModule mod_proxy.c +#AddModule mod_cern_meta.c +AddModule mod_expires.c +AddModule mod_headers.c +#AddModule mod_usertrack.c +#AddModule mod_example.c +#AddModule mod_unique_id.c +AddModule mod_so.c +AddModule mod_setenvif.c + +AddModule mod_perl.c + + +AddModule mod_php.c + + +AddModule mod_php3.c + + +AddModule mod_php4.c + + +AddModule mod_php5.c + + +AddModule mod_dav.c + + +AddModule mod_roaming.c + + +AddModule mod_ssl.c + + +AddModule mod_put.c + + +AddModule mod_python.c + # # ExtendedStatus controls whether Apache will generate "full" status @@ -243,15 +405,15 @@ # when the value of (unsigned)Group is above 60000; # don't use Group "#-1" on these systems! # -User nobody -Group "#-1" +User apache +Group apache # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. # -ServerAdmin you@your.address +ServerAdmin root@localhost # # ServerName allows you to set a host name which is sent back to clients for @@ -269,14 +431,14 @@ # machine always knows itself by this address. If you use Apache strictly for # local testing and development, you may use 127.0.0.1 as the server name. # -#ServerName www.example.com +#ServerName localhost # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # -DocumentRoot "@@ServerRoot@@/htdocs" +DocumentRoot "@@ContentRoot@@/html" # # Each directory to which Apache has access, can be configured with respect @@ -301,7 +463,7 @@ # # This should be changed to whatever you set DocumentRoot to. # - + # # This may also be "None", "All", or any combination of "Indexes", @@ -310,7 +472,7 @@ # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # - Options Indexes FollowSymLinks MultiViews + Options Indexes FollowSymLinks # # This controls which options the .htaccess files in directories can @@ -330,9 +492,17 @@ # UserDir: The name of the directory which is appended onto a user's home # directory if a ~user request is received. # - - UserDir public_html - +# The path to the end user account 'public_html' directory must be +# accessible to the webserver userid. This usually means that ~userid +# must have permissions of 711, ~userid/public_html must have permissions +# of 755, and documents contained therein must be world-readable. +# Otherwise, the client will only receive a "403 Forbidden" message. +# +# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden +# +# +# UserDir public_html +# # # Control access to UserDir directories. The following is an example @@ -356,7 +526,7 @@ # directory index. Separate multiple entries with spaces. # - DirectoryIndex index.html + DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi # @@ -405,7 +575,7 @@ # to be found. # - TypesConfig conf/mime.types + TypesConfig /etc/mime.types # @@ -431,6 +601,7 @@ # module is part of the server. # +# MIMEMagicFile /usr/share/magic.mime MIMEMagicFile conf/magic @@ -476,7 +647,8 @@ # define per- access logfiles, transactions will be # logged therein and *not* in this file. # -CustomLog logs/access_log common +# CustomLog /var/log/httpd/access_log common +CustomLog logs/access_log combined # # If you would like to have agent and referer logfiles, uncomment the @@ -536,9 +708,9 @@ # realname must also be slash terminated, and if the fakename omits the # trailing slash, the realname must also omit it. # - Alias /icons/ "@@ServerRoot@@/icons/" + Alias /icons/ "@@ContentRoot@@/icons/" - + Options Indexes MultiViews AllowOverride None Order allow,deny @@ -549,14 +721,14 @@ # even if you change the DocumentRoot. Comment it if you don't want to # provide access to the on-line documentation. # - Alias /manual/ "@@ServerRoot@@/htdocs/manual/" - - - Options Indexes FollowSymlinks MultiViews - AllowOverride None - Order allow,deny - Allow from all - + # Alias /manual/ "@@ServerRoot@@/htdocs/manual/" + # + # + # Options Indexes FollowSymlinks MultiViews + # AllowOverride None + # Order allow,deny + # Allow from all + # # # ScriptAlias: This controls which directories contain server scripts. @@ -566,13 +738,13 @@ # The same rules about trailing "/" apply to ScriptAlias directives as to # Alias. # - ScriptAlias /cgi-bin/ "@@ServerRoot@@/cgi-bin/" + ScriptAlias /cgi-bin/ "@@ContentRoot@@/cgi-bin/" # - # "@@ServerRoot@@/cgi-bin" should be changed to whatever your ScriptAliased + # "@@ContentRoot@@/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # - + AllowOverride None Options None Order allow,deny @@ -597,7 +769,7 @@ # # FancyIndexing is whether you want fancy directory indexing or standard # - IndexOptions FancyIndexing + IndexOptions FancyIndexing NameWidth=* # # AddIcon* directives tell the server which icon to show for different @@ -752,6 +924,25 @@ # AddType application/x-tar .tgz + # These types cause httpd to let the PHP interpreter handle files with + # the specified extensions. + # + + AddType application/x-httpd-php .php .php4 .php3 .phtml + AddType application/x-httpd-php-source .phps + + + AddType application/x-httpd-php .php .php4 .php3 .phtml + AddType application/x-httpd-php-source .phps + + + AddType application/x-httpd-php3 .php3 + AddType application/x-httpd-php3-source .phps + + + AddType application/x-httpd-php .phtml + + # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. @@ -782,8 +973,8 @@ # # To use server-parsed HTML files # - #AddType text/html .shtml - #AddHandler server-parsed .shtml + AddType text/html .shtml + AddHandler server-parsed .shtml # # Uncomment the following line to enable Apache's send-asis HTTP file @@ -794,7 +985,7 @@ # # If you wish to use server-parsed imagemap files, use # - #AddHandler imap-file map + AddHandler imap-file map # # To enable type maps, you might want to use @@ -873,6 +1064,39 @@ # End of browser customization directives # +# If the perl module is installed, this will allow execution of mod_perl +# to compile your scripts to subroutines which it will execute directly, +# avoiding the costly compile process for most requests. +# +# +# Alias /perl /var/www/perl +# +# SetHandler perl-script +# PerlHandler Apache::Registry +# Options +ExecCGI +# +# + +# +# Allow http put (such as Netscape Gold's publish feature) +# Use htpasswd to generate /etc/httpd/conf/passwd. +# +# +# Alias /upload /tmp +# +# EnablePut On +# AuthType Basic +# AuthName Temporary +# AuthUserFile /etc/httpd/conf/passwd +# EnableDelete Off +# umask 007 +# +# require valid-user +# +# +# + +# # Allow server status reports, with the URL of http://servername/server-status # Change the ".example.com" to match your domain to enable. # @@ -884,6 +1108,17 @@ # # +# Allow access to local system documentation from localhost +# +Alias /doc/ /usr/share/doc/ + + order deny,allow + deny from all + allow from localhost .localdomain + Options Indexes FollowSymLinks + + +# # Allow remote server configuration reports, with the URL of # http://servername/server-info (requires that mod_info.c be loaded). # Change the ".example.com" to match your domain to enable.