[APACHE FAQ]

Apache HTTP Server Version 1.3

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

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 animal@casema.net 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 the following:


1.Background


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) and Rüdiger Kuhlmann (Ruediger.Kuhlmann@stud.uni-karlsruhe.de) with the documentation and main Amiga Apache web site being maintained by Bert Vortman (apache@dsdelft.nl). This FAQ is maintained by Bert Vortman(apachefaq@spinnewiel.ddns.org), 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


Where to download it


Extra files and things

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: apache-bugs@spinnewiel.ddns.org The utilities are:

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. In the How do i? Documentation is a full description of how to use serverside includes!

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
Problems with usergroups - what to do about them?


How do I stop users accessing certain directories?

In the How do I? documentation is all the information you need.

apachefaq@spinnewiel.ddns.org