Apache HTTP Server Version 1.3.11 (Amiga)

FAQ

Go to the old FAQ.


What is it?

Q: What is this program actually about?

A: Amiga Apache is the Amiga port of Apache, the web server used on most of the machines in the internet. It allows others to access web pages on your computer you want to publish. It doesn't cost you any money - since the original Apache is distributed under the GPL (GNU public licence), the port also it, which basically means its free.

Anyway, if you want to tell me you're using Amiga Apache, feel absolutely free to send me a postcard from your home town to:

Rüdiger Kuhlmann
Im Gießenbach 59
57234 Wilnsdorf
GERMANY


Who is doing it?

Q: Who is doing all this work?

A: The Amiga port of Apache has been compiled by Jeff Shepherd with some changes and bug fixes by Rüdiger Kuhlmann. The website was originally hosted and maintained by Bert Vortman (who seems to have disappeared from the net) at http://www.xs4all.nl/~albertv/apache/index.html, and is now maintained by Rüdiger Kuhlmann at http://amiga-apache.home.pages.de, who also runs the mailinglist and did the last Aminet upload. The FAQ was somewhen maintained by Brett Burridge, who seems not to be involved in the Amiga anymore, and seems like I have to continue his work.

Remember that all persons are volunteers - feel free to contribute.


Apache won't start. I'm using AFS/PFS/PFS3.

Q: When I try to start Apache, it complains that it can't open it's logfiles. I'm using AFS/PFS/PFS3. What is going on?

A: AFS/PFS/PFS3 has the bug to not allow programs to open a file several times at the same time in MOD_READWRITE, although this is perfectly legal. Unfortunately, AmigaApache spawns a bunch of subprocesses, and each one tries to open the necessary log files during it's startup. Hence, you have to put your logfiles onto a non-AFS/PFS/PFS3/partition; FFS, SFS or even RAM and RAD will do.

UPDATE: There is an update on Aminet in the biz/patch directory to fix this problem for PFS3.


configure doesn't even find cat, rm, sed etc.

Q: I'm trying to recompile, but configure doesn't even find cat, rm, sed etc, although I can start them using my Amiga shell. It's strange anyway, these files are listed as if they were directories. I'm using SFS < 1.62. This is what configure says, when I use the supplemented config.status.68040 file:

1.Tmp:apache_1.3.11> sh ./config.status.68040
./configure: ./configure[104]: cat: not found
./configure: ./configure[104]: grep: not found
./configure: ./configure[104]: sed: not found
Configuring for Apache, Version
src/helpers/PrintPath: src/helpers/PrintPath[86]: sed: not found
[...]
configure:Error: Path layout definition not found or incorrect
1.Tmp:apache_1.3.11>

A: You should update SFS to at least version 1.62. There is a bug in GG which prevent symbolic links to work properly using ixemul, which doesn't show up when you use FFS. A workaround was added for SFS 1.62. The newest version of SFS can always be found at http://www.xs4all.nl/~hjohn/, but it might still be a beta release. As for SFS 1.84, do not use the defragmenter unless you want to be a beta-tester.


make breaks with an error about "struct timeval".

Q: I'm trying to recompile, but when I type make, it breaks with an error about "struct timeval". Here is what it says:

1.Tmp:apache_1.3.11> make
===> src
make[1]: Entering directory /Tmp/apache_1.3.11'
make[2]: Entering directory /Tmp/apache_1.3.11/src'
===> src/os/amiga
gcc -c  -I../../os/amiga -I../../include  -m68040 -O2 -resident32 -mstackextend -Dfork=vfork -DNO_DBM_REWRITEMAP ../../apaci os.c
In file included from /gg/include/dos/dosextens.h:26,
                 from /gg/include/clib/dos_protos.h:18,
                 from /gg/include/proto/dos.h:11,
                 from ../../include/ap_config.h:285,
                 from ../../include/httpd.h:71,
                 from os.c:7:
/gg/include/devices/timer.h:25: redefinition of `struct timeval'
make[3]: *** [os.o] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory /Tmp/apache_1.3.11/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory /Tmp/apache_1.3.11'
make: *** [build] Error 2
1.Tmp:apache_1.3.11>

A: This is a conflict between the unix and the AmigaOS definition of "struct timeval". There used to be a patch, which fiddled around with the AmigaOS include (bad idea), but I can't find it anymore. Anyway, the cleaner way to do it is the following: In the file /gg/include/sys/time.h, replace the following code:

#ifndef DEVICES_TIMER_H
/* Use whatever was included first, standard or Amiga (devices/timer.h)
 * includes (jch). */
struct timeval {
        long    tv_sec;         /* seconds */
        long    tv_usec;        /* and microseconds */
};
#else
#define tv_sec  tv_secs
#define tv_usec tv_micro
#endif
into the following lines:
/* Always use Amiga include */
#include <devices/timer.h>
#define tv_sec  tv_secs
#define tv_usec tv_micro
And everything will be fine.
[APACHE DOCUMENTATION]

The Amiga port of the Apache webserver - Frequently asked questions.

This document is version 1.12 of the Amiga Apache FAQ. It was last modifed on the 8 August 1997. All comments, questions etc. about this FAQ should be addressed to apache@babylon6.demon.co.uk or alternatively use the feedback form located here. 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, and as I am about to start a new job, little time to do it in. If you want to add to the FAQ, or 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 the following:


1.Background

2. Technical aspects

1. Background

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, (jshepher@mks.com) with the documentation and main Amiga Apache web site being maintained by Bert Vortman (apache@dsdelft.nl). This FAQ is maintained by Brett Burridge (apache@babylon6.demon.co.uk), with contributions from Jeff, Bert 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


Where to download it


Extra files and things

need to write this section :-( Here will be information about extra bits and pieces.

Known Amigas running Apache on the WWW


Where to get help & information


1. Technical aspects

Using Apache with Miami

Miami is an easy to use integrated TCP/IP stack and dialup networking client for the Amiga. A demo version is available in Aminet (comm/tcp/Miami20g.lha). 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 anything.

Configuration of Miami to use the Apache server is very straightforward:

Interface:

Ensure you have typed in a valid IP address for your machine.

Database:

Under services, add an extra entry as follows: Name: http ID: 80 Protocol: tcp
Under hosts, you may need to add an extra entry as follows: IP address: 127.0.0.1 Name: localhost
(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 Aliases: loopback
Under INETD, add: Service: http Socket: stream Protocol: tcp Wait: nowait User: root Server: apache:httpd
(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.


Using 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 158.152.178.241, so if I am online, people can access my Amiga website on http://158.152.178.241/ . Remember that this address has nothing to do with your WWW site on Demon Internet itself.

How to 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.

CGI scripting using Perl

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).

This 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?


OK, I've got SSI working, where can I find some cool scripts?


When 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.

Why 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.)

 


Problems in standalone mode

getpeername: Socket operation on non-socket
getsockname: Socket operation on non-socket
Error getting local address
- Bert Vortman.
Problems with usergroups - what to do about them?


How do I stop users accessing certain directories?

Information about how to do this will be added shortly - I now have all the required software and knowledge, but no time to sit down and write about it. :-)

apache@babylon6.demon.co.uk

Apache HTTP Server Version 1.3.11 (Amiga)

Index