httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Sanders <sand...@bsdi.com>
Subject httpd.conf cleanup
Date Thu, 25 Apr 1996 04:21:24 GMT
I took the apache 1.1b2 conf/httpd.conf-dist file and reformatted
it to be cleaner and more complete.  I hope someone can integrate
this into a release of apache.  I would actually vote that be considered
a bug fix and go in 1.1 but I'm sure others would disagree...

Changes other than formatting:
    Moved ``HostnameLookups'' [reason: bug fix -- isn't that used
	    even if you are inetd?  If not move it back.]
    Changed "ServerAdmin" to "webmaster".  Surely this is better
	    than "you@your.address" as a default
    Added the three *Config parameters that were missing
    Commented all the path names out by default (e.g., ServerRoot).
    Provided 4BSD style (i.e. /var/* paths) defaults for paths
	    that can be uncommented
    Moved "Listen" up with "BindAddress" [bug fix -- this is a
	    standalong thing like bindaddress right?]

------- cut here ------
###
### This is the main server configuration file for Apache 1.1b2
### See http://www.apache.org/ for instructions.
###
### Do NOT simply read the instructions in here without understanding
### what they do, if you are unsure consult the online docs. You have been
### warned.
###
### Originally by Rob McCool

### ServerType [``inetd'' | ``standalone'']
ServerType standalone

###
### If you are running from inetd, skip ahead to "ServerAdmin".
###

### Port <port#>
# The port the standalone listens to.  For ports < 1023, you will
# need httpd to be run as root initially.
Port 80

### User <user>
### Group <group>
# The name (or #number) of the user/group to run httpd as.
# On SCO (ODT 3) use ``User nouser'' and ``Group nogroup''.
# If you wish httpd to run as a different user or group, you
# must run httpd as root initially and it will switch.
User nobody
Group #-1

### ServerAdmin <user>
# Address where problems with the server should be e-mailed.
#ServerAdmin webmaster@your.domain.name
ServerAdmin webmaster

### ServerRoot
# The directory the server's config, error, and log files are kept.
# Overrides the compiled in default.
#ServerRoot /var/www

### BindAddress [``*'' | <ip_address> | <domain_name>]
# You can use this option to support virtual hosting with one
# server per IP address.  This option tells the server which
# IP address to bind to so that only requests on that IP address
# are processed.  # See also the VirtualHost directive.
#BindAddress *

### Listen [<port> | <ip_address:port>]
# Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default.  See also <VirtualHost>
# and BindAddress.
#Listen 3000
#Listen 12.34.56.78:80

### HostnameLookups [``on''| ``off'']
# Log the names of clients or just their IP numbers
# e.g.,  www.apache.org (on) or 204.62.129.132 (off)
HostnameLookups on

### TransferLog <filename>
# The location of the transfer log file.  If this does not
# start with /, ServerRoot is prepended to it.
# Overrides the compiled in default.
#TransferLog /var/log/httpd/access_log

### ErrorLog <filename>
# The location of the error log file.  If this does not start
# with /, ServerRoot is prepended to it.
# Overrides the compiled in default.
#ErrorLog /var/log/httpd/error_log

### PidFile <filename>
# The location of the server process ID log file.  If this does not
# start with /, ServerRoot is prepended to it.
# Overrides the compiled in default.
#PidFile /var/run/httpd.pid

### ScoreBoardFile <filename>
# File used to store internal server process information.
# Overrides the compiled in default.
#ScoreBoardFile /var/run/apache_status

### ResourceConfig <filename>
# The location of the server resource configuration file.  If this does not
# start with /, ServerRoot is prepended to it.
# Overrides the compiled in default.
#ResourceConfig conf/srm.conf

### AccessConfig <filename>
# The location of the server access configuration file.  If this does not
# start with /, ServerRoot is prepended to it.
# Overrides the compiled in default.
#AccessConfig conf/access.conf

### TypesConfig <filename>
# The location of the server access configuration file.  If this does not
# start with /, ServerRoot is prepended to it.
# Overrides the compiled in default.
#TypesConfig conf/mime.types

### ServerName <domain_name>
# Allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get
# (i.e. to use "www.domain.com" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work.  The name you 
# define here must be a valid DNS name for your host.  If you don't understand
# this, ask your network administrator or service provider.
#ServerName new.host.name

### CacheNegotiatedDocs
# By default, Apache sends Pragma: no-cache with each document that
# was negotiated on the basis of content.  This asks proxy servers
# not to cache the document.  Uncommenting the following line disables
# this behavior, and proxies will be allowed to cache the documents.
#CacheNegotiatedDocs

### Timeout <seconds>
# The number of seconds before receives and sends time out.
# N.B.: the compiled default is 1200 seconds (20 minutes)
Timeout 400

### KeepAlive <number_requests>
# The number of Keep-Alive persistent requests to accept
# per connection.  Set to 0 to deactivate Keep-Alive support.
KeepAlive 5

### KeepAliveTimeout <seconds>
# Number of seconds to wait for the next request.
KeepAliveTimeout 15

###
### Server-pool size regulation.  Rather than making you guess how many
### server processes you need, Apache dynamically adapts to the load it
### sees --- that is, it tries to maintain enough server processes to
### handle the current load, plus a few spare servers to handle transient
### load spikes (e.g., multiple simultaneous requests from a single
### Netscape browser).
###
### It does this by periodically checking how many servers are waiting
### for a request.  If there are fewer than MinSpareServers, it creates
### a new spare.  If there are more than MaxSpareServers, some of the
### spares die off.  These values are probably OK for most sites ---
###

### MinSpareServers <number_servers>
MinSpareServers 5

### MaxSpareServers <number_servers>
MaxSpareServers 10

### StartServers <number_servers>
# Number of servers to start.  Will grow as needed upto MaxClients.
StartServers 5

### MaxClients <number_servers>
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# Unix with it as it spirals down...
MaxClients 150

### MaxRequestsPerChild
# The number of requests each child process is allowed to process
# before the child dies.  The child will exit so as to avoid problems
# after prolonged use when Apache (and maybe the libraries it uses)
# leak.  On most systems, this isn't really needed, but a few (such
# as Solaris) do have notable leaks in the libraries.
MaxRequestsPerChild 30

###
### Proxy Server directives.
###

### ProxyRequests [``On'' | ``Off'']
# Off by default.  Uncomment to enable the proxy server.
#ProxyRequests On

### ProxyRemote <match> <remote-server>
# Defines remote proxies to this proxy.
#ProxyRemote http http://webproxy.mydomain.com:8080

### ProxyPass <path> <url>
# Allows remote servers to be mapped into the space of the local server;
# appearing as a mirror.
#ProxyPass /mirror/foo http://foo.com

### To enable the cache as well, edit and uncomment the following lines:
#CacheRoot /usr/local/etc/httpd/proxy
#CacheSize 5
#CacheGcInterval 4
#CacheMaxExpire 24
#CacheLastModifiedFactor 0.1
#CacheDefaultExpire 1

### <VirtualHost domain_name> ... </VirtualHost>
# Allows the daemon to respond to requests for more than one server
# address, if your server machine is configured to accept IP packets
# for multiple addresses.  This can be accomplished with the ifconfig
# alias flag, or through kernel patches like VIF.
#
# Any httpd.conf or srm.conf directive may go into a VirtualHost command.
# See also the BindAddress entry; which must be ``*'' if you want
# more than one VirtualHost entry.
#
# Note that in addition to any VirtualHost's there is still a
# server running on the INADDR_ANY port so if you have any IP addresses
# on your machine not covered by VirtualHost entries (or if something
# should happen and one of the VirtualHost entries isn't working properly
# then users connecting to a server on that IP address will get the
# default server; in which case it's a good idea to setup the default
# server to just print an error.

#<VirtualHost host.foo.com>
#ServerAdmin webmaster@host.foo.com
#DocumentRoot /www/docs/host.foo.com
#ServerName host.foo.com
#ErrorLog logs/host.foo.com-error_log
#TransferLog logs/host.foo.com-access_log
#</VirtualHost>

Mime
View raw message