Brief Tutoral on Installing thttpd 2.25b

March 25th, 2005

To install thttpd:

wget http://www.acme.com/software/thttpd/thttpd-2.25b.tar.gz
groupadd www
tar -zxf thttpd-2.25b.tar.gz
cd thttpd-2.25b
./configure --prefix=/usr/local/thttpd --mandir=/usr/local/man
make
make install

Then you can start it with:

/usr/local/thttpd/sbin/thttpd -p 80 -d /usr/local/thttpd/www

The -p option is the port you want the server to run on, and the -d option is for the root directory you want it to serve pages from.

Edit /usr/local/thttpd/www/index.html and insert the following:

<html>
	<head>
		<title>Welcome to thttpd 2.25b</title>
	</head>
	<body>
		<h1>Welcome to thttpd 2.25b</h1>
	</body>
</html>

WARNING!

If you do not specify the directory with -d, thttpd will default to the directory you ran the command from! This is a major security issue.