Apache HTTP Server Version 1.3
The Amiga port of the Apache webserver - Frequently
This document is version 1.18 of the Amiga Apache FAQ.
It was last modifed on the 16 March 1999. All comments, questions etc.
about this FAQ should be addressed to firstname.lastname@example.org
Note that will I accept no responsibility for any losses incurred as a
result of following any of the procedures described in this document -
proceed at your own risk.
Note that this is an early draft of the FAQ
- there's still a lot of work to be done. If you have suggestions for additions,
then send mail to the address above.
I am well aware of the problems with the poor layout of the FAQ in Voyager-NG,
there's nothing I can do about that :-( (it looks fine in AWeb-II, AMosaic,
MS IE4 and Netscape 2). At the moment, I am particularly interested in
Known Amigas connected to the WWW. It
would be useful to list a few Amiga Apache webservers, just to show that
the Amiga really can be used as a server. Note that I'm only really interested
in sites permanently connected to the WWW.
Cool AREXX scripts to use with the server. The Amiga's
biggest advantage over other systems as far as Apache is concerned is AREXX,
so let's show what the machine is capable of.
What is Apache?
The Apache webserver software was created as an alternative
to the popular NCSA httpd webserver. It has more features greater functionality,
and is now the most popular webserver software on the Internet. Put very
simply, Apache is the software that allows people to run websites on their
machines. The webserver originated on Unix systems, but has since been
ported to many other systems, including the Amiga.
The Apache server project is completely run by volunteers,
and there is no official technical support.
The Amiga version
The Amiga port of the Apache webserver has been compiled
by Jeff Shepherd, (email@example.com) and
Rüdiger Kuhlmann (Ruediger.Kuhlmann@stud.uni-karlsruhe.de)
with the documentation and main Amiga Apache web site being maintained
by Bert Vortman (firstname.lastname@example.org).
This FAQ is maintained by Bert Vortman(email@example.com),
with contributions from Jeff, Bert, Rüdiger and other Amiga Apache users. As with
the original Unix version of Apache, all persons connected with the Amiga
Apache project are volunteers.
What you need
to run it
An Amiga ;-) Any model should do, but
a minimum of 8Mb fast RAM is a good thing for running the machine
offline. If you want your server permanently connected to the WWW, you
will need a truck load of RAM to prevent it chocking if several users are
logged in simultaneously. A 68030 or above is a very good thing.
Plenty of HD space - though the actual server is small, installations of
associated applications like Perl 5 take up quite large amounts of HD real
A TCP/IP stack for the Amiga. AMITCP 4.0 onwards
will do. Miami 2.0 will also work The TCP/IP stack must be running for
Apache to function. Note that you shouldn't
need to start the Apache server - the TCP/IP client will automatically
start it if you get an incoming HTTP request. However, starting Apache
in standalone mode is preferred! Start and control Apache with the provided
apachectl script in the support directory.
The Apache files from the main site (more details
below). There are also additional files required if you want to run CGI
A good understanding of the Amiga is essential.
Web server installation is not a trivial task on any system. Some knowledge
of Unix is very useful, and if you want to write your own CGI scripts,
Perl, Unix shell, AREXX or C programming skills are essential.
Where to download
The Amiga port of the Apache webserver
may be downloaded from here.
The most recent version of the server is kept here, along with the archives
containing related files.
Extra files and
In the support directory are some utilities available that comes with Apache.
Note, the utilities are not fully tested. It is possible that some utilities won't
work well. If you encounter such a file, mail it to: firstname.lastname@example.org
The utilities are:
Apache HTTP server benchmarking tool
ab is a tool for benchmarking your Apache HyperText Transfer Protocol (HTTP)
server. It is designed to give you an impression on how performant is your
current Apache installation. This especially shows you how much requests per
time your Apache installation is capable to serve.
Apache HTTP server control interface
apachectl is a front end to the Apache HyperText Transfer Protocol (HTTP)
server. It is designed to help the administrator control the
functioning of the Apache
APache eXtenSion tool
apxs is a tool for building and installing extension modules for the Apache
HyperText Transfer Protocol (HTTP) server. This is achieved by building a
dynamic shared object (DSO) from one or more source or object
files which then can be loaded into the Apache server under runtime via the
LoadModule directive from mod_so. So to use this extension mechanism your platform has
to support the DSO feature and your Apache httpd
binary has to be built with the mod_so module.
The apxs tool automatically complains if this is not the case.
You can check this yourself by manually running the command 'httpd -l'
Create and update user authentication files in DBM format
Dbmmanage is used to create and update the DBM format files used to store
usernames and password for basic authentication of HTTP users. Resources available from the
httpd Apache web server can be restricted to just the users listed in the files created by
dbmmanage. This program can only be used when the usernames are stored in a DBM file.
Create and update user authentication files
Htdigest is used to create and update the flat-files used to store
usernames, realm and password for digest authentication of HTTP users.
Resources available from the httpd Apache web server can be restricted to just
the users listed in the files created by htdigest.
Create and update user authentication files
Htpasswd is used to create and update the flat-files used to store
usernames and password for basic authentication of HTTP users.
Resources available from the httpd Apache web server can be restricted to just the users listed
in the files created by htpasswd. This program can only be used
when the usernames are stored in a flat-file. To use a DBM database see dbmmanage.
resolve hostnames for IP-adresses in Apache logfiles
Logresolve is a post-processing program to resolve IP-adresses in Apache's access
logfiles. To minimize impact on your nameserver, logresolve has its very own
internal hash-table cache. This means that each IP number will only be looked
up the first time it is found in the log file.
Perl program for resolving hostnames
This program probably won't work because of the fork() in it.
Script to detect phf abuse
This script can be used to detect people trying to abuse the security hole which
existed in A CGI script direstributed with Apache 1.0.3 and earlier versions.
rotate Apache logs without having to kill the server
Rotatelogs is a simple program for use in conjunction with Apache's piped logfile
feature which can be used like this:
TransferLog "|rotatelogs /path/to/logs/access_log 86400"
This creates the files /path/to/logs/access_log.nnnn where nnnn is the system
time at which the log nominally starts (this time will always be a multiple of
the rotation time, so you can synchronize cron scripts with it). At the end
of each rotation time (here after 24 hours) a new log is started.
A perl script for splitting the server access logfile
This script will take a combined Web server access
log file and break its contents into separate files.
It assumes that the first field of each line is the
virtual host identity (put there by "%v"), and that
the logfiles should be named that+".log" in the current
Switch User For Exec
Suexec is the "wrapper" support program for the suEXEC behaviour for Apache.
It is run from within Apache automatically to switch the user when
an external program has to be run under a different user. For more
information about suEXEC see the document `Apache suEXEC Support'
Amigas running Apache on the WWW
My A1200 is at http://220.127.116.11,but it isn't presently connected as I need a browser with a shockwave plugin, and that means connecting up the Pentium :-).
Several other people have emailed their server addresses,
but I haven't been able to log in to any of them so far, with the exception
of this one: amiga.3wis.nl. An interesting
site, but beware - it contains a lot of images.
There is also supposed to be an Amiga at www.tibb.at, but I haven't tried this one yet.
Where to get help &
The usenet newsgroup comp.sys.amiga.networking
is often a good place for asking specific questions about the Apache server,
AmiTCP, Miami and any other Amiga networking type things. As for Apache
problems, the newsgroup comp.infosystems.www.servers.unix
could be a good place to try, due to the higher traffic level than c.s.a.networking,
but don't ask Amiga-specific questions there or you'll be in for a good
Contact the FAQ maintainer by email to: email@example.com. Note that I will try
and answer any questions asked, but I know nothing about ppp.devices or
BBS systems. General Amiga questions, Unix-related things and Apache installation/configuration
are more easily answered by my good self.
Join the mailing list for the Amiga Apache beta testers.
Details of the list are on the main Amiga Apache.
For general information about the Apache webserver,
visit the main page at www.apache.org
but note that you are unlikely to find Amiga specific information here.
The main Apache FAQ may be obtained from www.apache.org
or from here
in the UK. This document contains information about the history of the
server, amd answers to some of the more common problems (like turning on
SSI). And if you want to know why the server is called Apache - here's
where you'll find the answer.
Apache Week is available from this
website and is an essential source of information for the latest Apache
news etc. They also have a fully searchable index for back issues. Again,
there isn't a great deal of Amiga specific information (just one article
in fact) but as more Amiga users get the Apache server installed, perhaps
we can rectify that...
A book I find useful is Webmaster in a nutshell:
A desktop quick reference (O'Reilly - ISBN 1-56592-229-8) which details
all of the directives available in the server configuration files. There
Another good book to have if you are not familiar with Unix is something
like Unix for Dummies - if you don't know what I'm referring to
by mentioning chmod, then you would be advised to get a book such
1. Technical aspects
Using Apache with
Miami is an easy to use integrated TCP/IP stack and
dialup networking client for the Amiga. A demo version is available in
Note that not all of these settings may be essential - I messed around
with Miami for a couple of hours before getting Apache to work, so some
of the settings I changed may not be essential, and some of them may already
be set by default. If anyone manages to follow these instructions successfully,
please email me so that I know they are correct, and that I haven't forgotten
Configuration of Miami to use the Apache server is
Download and install Miami version 2.0 or above. Configure
it to allow connection to the WWW through your usual Internet Service Provider/
Ethernet connection. (i.e. set up things such as the locations of DNS servers,
your domain name etc.)
There are a number of settings to add to Miami before
Apache will work:
Ensure you have typed in a valid IP address for your
Under services, add an extra entry as follows:
Name: http ID: 80
Under hosts, you may need to add an extra
entry as follows: IP address: 127.0.0.1
(the IP address 127.0.0.1 loops back to your own
machine, i.e. the localhost).
Under networks, add the following: Name:
loop ID: 127
Under INETD, add: Service: http
Socket: stream Protocol: tcp
Wait: nowait User: root
(if you have installed the Apache httpd executable
file elsewhere, change the server location! Mine is in an assign called
apache:, yours might not be.)
Users: you might need to add a user, as Apache
didn't seem to work without this. I added user: brett,
and under Home dir, added root.
Groups: as with users, you might need
to add something here - I added a group called brettgroup,
and made brett a user.
That's everything for the Miami side of things. Make
sure you save these settings, or you'll have to retype it all.
To make sure it works, start Miami (you don't need
to connect to the WWW - just ensure the Miami program is running), fire
up an Amiga browser (any will do) and assuming you have configured Apache,
if you type http://127.0.0.1 or http://localhost/,
you should get a response from Apache.
Apache with a Demon Internet account
If you have an account with Demon Internet (one of the
largest ISPs in the UK), then you will be provided with a permanent IP
address. This is a very good thing for setting up your own server. While
you are connected to the WWW, and assuming you have correctly configured
Apache, your server will reside at http://IP_address/
(for example, I have the IP address 18.104.22.168, so if I am online,
people can access my Amiga website on http://22.214.171.124/
. Remember that this address has nothing to do with your WWW site on Demon
use server-side includes
One thing to remember when running CGI scripts on Apache is that the initial stack size of the httpd program must be high enough. A stack size of 150000 bytes is a good start, but I it probably depends on how many cgi programs you are running.
In the How do i? Documentation is a full description of how to use serverside includes!
Take a look around the WWW and you will find out that
most of the CGI scripts are written in Perl. The advantage of this is that
Perl scripts may be ported to different machines with minimal changes.
Perl is available for most systems, including the Amiga (version 5 can
be obtained from the Aminet directory dev/lang
- an older version is supplied as one of the files in the archive of additional
files on the main Amiga Apache site).
Perl is a nightmare, can't I write my CGI scripts in C?
You certainly can! In fact, scripts can be written in
any language you may have on your Amiga, but C is especially useful. C
executable files generally run a lot faster than their Perl equivalents,
so this will reduce server load. There are also lots of resources available
on the web to assist with the creation of CGI scripts written in C. A particularly
useful starting point is the cgihtml library for C. This may be
downloaded from http://www.eekim.com/software/
. Note that I have so far been unable to port this to the Amiga (don't
yet know enough C!) but the source code may be examined to give you a good
idea of how to write CGI scripts in C.
Can I write CGI scripts using SAS/C?
There is a problem with not being able to access environment variables when using SAS/C to write CGI scripts. This is due to the C programs not being compiled with the ixemul.library, as they are with the GCC compiler. The latest version of Apache does apparently fix this problem.
I've got SSI working, where can I find some cool scripts?
The main Amiga Apache site has a section for scripts.
The best place on the whole WWW for Perl scripts is
Matt's script archive.
This is a superb site, with well documented example scripts for access
counters, random quotes, etc. etc. Most of the scripts are written in Perl,
and can be ported to the Amiga with a minimum of fuss (even by non-Perl
programmers such as myself).
my sh scripts need to access external AmigaDOS functions, I get
a requestor asking for IXPIPE:
The IXPIPE: device is required to allow some scripts
written with the sh shell access to AmigaDOS functions. IXPIPE: can be
found in one of the gnu C compiler distribution archives, gcc272-base.lha,
available from Aminet by clicking here.
can't I access certain files and directories through the server?
Occasionally, you may get error reports through the
browser informing you that you are unable to access certain files and directories.
This appears to be due to the access rights for the file, and changing
them with the utility chmod normally does the trick. The Amiga port
of chmod is included with the lha archive of useful extras
available from the main Amiga Apache site. To use it, type chmod o+rx
filename in an AmigaDOS window (handy hint: it is extremely useful
to set up a chmod button in a filemanager such as DOPUS.)
I think I have some problems with the standalone
mode of httpd, or maybe I forgot something when reconfiguring amitcp (after
the crash), I can't see or find what, so maybe you can shine some light
on it. When I start httpd I got this message:
getpeername: Socket operation on non-socket
getsockname: Socket operation on non-socket
Error getting local address
It does not matter if I use it online or offline.
INETD works fine, no problems with that. Strange is it?
with usergroups - what to do about them?
to make sure the ServerMode is standalone when running standalone. If you
try running in standalone mode with the ServerMode set to inetd you get
- Jeff Shepherd
Every time I try to run httpd, I am told
that http is a bad group (or something similar.) If I try changing the
user/group in httpd.conf, I get the same message. httpd seems to ignore
alternate config files. For example, httpd -f /directory/which/does/not/exist.conf
produces the same message as httpd -f /apache/conf/httpd.conf.
Well, you mentioned it yourself, so I don't
have to do that ;). But to be serious,
it IS confusing. First thing you have to know is that Apache is
not programmed for the Amiga, it is a port
of a Unix program. Unix, is a multiuser
system, and apache relies on that multiuser aproach. I see that
you use multiuser yourself, so that makes
things easier to explain.
First of all, make a user httpuser (or http,
or whatever you like) and make a group
daemon. Download the ADE programs which you can find on the apache
homepage. Especially the fileutils archive is needed. Or maybe mufs
has the proper support already. But download
it anyway, it makes things easier. Do
that also for the perl and other archives. Make the 'httpuser' owner and
'daemon' group of the cgi-bin directory with
you have to do this for all files and directories
in the apache: directory.
you can use 'chown httpuser:daemon
*' for all files&directories in a directory
If you have done that for ALL files &
directories, then you need to make the
cgi-bin files executable with the command: chmod
775 <filename> or use the '*'
for a lot of files at once.
After that, add the same user&group in
the httpd.conf. Well, then things should run.
If you download from aminet the unixdirs3 archive (in util/boot i think)
then you can use scripts a bit easier. It
is possible that you have to set the
S protection bit for some scripts. Also very handy is the executehack
also on Aminet in: util/cli.
NOTE: if you change a script, don't forget
to set all permissions right. Just think
that your amiga becomes a true unix clone ;) and everything works fine.
do I stop users accessing certain directories?
In the How do I? documentation is all the information you need.