Configuring "phttpd.conf"

The "phttpd.conf" file (normally located in /opt/www/etc/) contains some settings that affect the global state of the server. Most of these settings can normally be ignored since they are automatically given reasonable defaults. However, there are a couple of important ones that you probably must and should modify.

The first one is the logical name of the server, which unless modified, defaults to the hostname of the machine the server is run on. For example:

	server-name = www.some.where

The next one is the WebMaster contact information, which is included into error messages generated by the server. For example:

	web-admin-name  = Foo Barson
	web-admin-home  = http://www.some.where/~foo/
	web-admin-email = foo@some.where

Configuration options:

server-name (string)
The full DNS name of the server that you want it to be known as. Defaults to the hostname of the machine.

server-addr (string)
The DNS name or IP number of the local interface to bind the server to. Defaults to "*" which causes it to bind to all local interfaces.

server-port (string)
The service name or number of the TCP port to bind the server to. Defaults to port 80 (the standard WWW port).

server-user (string)
The user name or number that the server should execute as. This will also cause the server-group option to be set to the group number defined in the password database for the specific user.

server-group (string)
The group name or number that the server should execute as.

web-admin-name (string)
Full name of the server administrator.

web-admin-home (string)
URL to the server administrators home page.

web-admin-email (string)
Email address to the server administrator.

url-rewrites (table)
A list of rewriting rules for incoming URLs.

url-redirects (table)
A list of temporarily redirected URLs.

url-permanent-redirects (table)
A list of permanently redirected URLs.

url-access (table)
A list of host access control rules.

url-authenticate (table)
A list of user/password authentication rules.

url-handlers (table)
A list of Phttpd Modules to be invoked for various URLs.

database-dir (string)
The directory where the global HTML documents are located. Defaults to the directory "/opt/www/db".

modules-dir (string)
The directory where the Phttpd Modules are located. Defaults to the directory "/opt/www/modules".

user-dir (string)
The subdirectory in the user's home directory where their HTML documents are located. Defaults to ".public".

logging-file (string)
Path to the request logging file. This file is written in the CERN Common Log format. Defaults to "/var/log/phttpd/requests".

counting-file (string)
Path to the request counting file. This file is written in a NDBM format for speedy access. Defaults to "/var/log/phttpd/counts".

pid-file (string)
Path to a file containing the process ID of the Phttpd daemon.

stderr-file (string)
Path to a file containing all stderr output from CGI scripts.

concurrency (number)
A number specifying the desired thread concurrency level.

listen-backlog (number)
A number specifying the desired TCP/IP new connection requests backlog limit.

socket-sndbuf (number)
The size of the transmit buffer for each request.

socket-rcvbuf (number)
The size of the receive buffer for each request.

gc-time (number)
The maximum time a request may be idle.

gc-sleep (number)
The time between each request garbage collect run.

select-timeout (number)
The maximum time to wait for incoming data.

stack-size (number)
The size of the stack for each thread.

fscache-refresh (number)
fscache-ttl (number)
fscache-gc-interval (number)
Controls how long entries live in the FileSystem cache.

urlcache-refresh (number)
urlcache-ttl (number)
urlcache-gc-interval (number)
Controls how long entries live in the URL lookup cache.

server-processes (number)
The number of parallell server processes doing accept() concurrently.
Warning: This does NOT work reliably under Solaris 2.4

accept-threads (number)
The number of threads concurrently waiting for incoming connections.

Boolean variables

bound-threads (boolean)
If set to "true", use bound threads instead of unbound threads.

hostname-lookups (boolean)
If set to "true", do hostname lookups for each incoming connection.