the djb way


what about configure?

The publicfile package comes with a configure utility, designed to quickly set up the publicfile services. It assumes you want to host documents for both services in the same archive, making them accessible to clients through either the ftpd or httpd servers.

The configure utility might be used as follows:

# cd /usr/local/publicfile/bin
# ./configure pubfile multilog /var/public localhost [...]

In this example, the arguments to configure are:


The user account to provide for envuidgid in the daemontools run scripts for both the httpd and ftpd services. (Comparable to the user accounts pubhttp and pubftp we used in the previous examples.)


The user account for the multilog logger.


The publicfile root directory for the document archives of both httpd and ftpd services will be created in /var/public/file. Also, this will be the top level directory for the local service directories of the daemontools run scripts and multilog logs: /var/public/httpd will be created for the httpd service; /var/public/ftpd will be created for the ftpd service.


These are the names for symbolic links configure should create pointing to the default 0 archive.

After running the configure utility above, the contents of the root directory in /var/public will look something like this:

# cd /var/public
# ls -l
drwxr-sr-x  file/
drwx--S--T  ftpd/
drwx--S--T  httpd/
# cd /var/public/file
# ls -l
drwxr-sr-x  0/
lrwxr-xr-x -> 0
lrwxr-xr-x  localhost -> 0
lrwxr-xr-x -> 0

The daemontools run scripts are automatically generated and installed by the configure utility. The services may then be started by linking into the /service directory:

# ln -s /var/public/ftpd /service/ftpd
# ln -s /var/public/httpd /service/httpd

If the services don't start, you probably need to check the run scripts and loosen up the softlimit parameters. (See the previous sections for example run scripts.)

The logs for each service will be contained within their respective service directories. To monitor the httpd log for example:

# tail -F /var/public/httpd/log/main/current | tai64nlocal

If you like /var/multilog for consistent access to your service logs, you can make these symbolic links:

# ln -s /var/public/ftpd/log/main /var/multilog/ftpd
# ln -s /var/public/httpd/log/main /var/multilog/httpd

Alternatively, edit the run scripts for the loggers and point them to /var/multilog directly.

If you like having all your documents in a single archive for both ftp and http, and aren't getting involved in serving name-based virtual hosts for different entities, the configure utility provides a fast way to get up and running with publicfile services.

Copyright © 2002, 2003, Wayne Marshall.
All rights reserved.

Last edit 2003.12.31, wcm.