ApacheTHTTPd

Choosing a Web Server

Apache is the well-known Web server but quite heavy. The Web server THTTPd is a nice and very simple-to-use Web server (which comes in two flavour: v2.25 without PHP and v2.21P22 with PHP). It worked out-of-the-box for me (and for many others) but for few problems, which took some time to work out:

  1. Make sure that you use the IXEmul.library v48.0 at least. (I have not tested THTTPd with other versions.)
  2. Make sure that you do not have a file "ENVARC:IXEmul.prefs": I had one and THTTPd would just start and quite right away. As soon as I deleted this file, THTTPd worked fine!
  3. Make sure that you do use the latest version of the IXEmul library, v63.1 at the time of writing, because with previous versions, v48.0 and v50.0, THTTPd kept crashing but is very stable with v63.1. However, v63.1 requires a FPU...

In addition, I had to recompile THTTPd because some of the constants values in its config.h file.

 

Configuring THTTPd

I noticed that the constant values assumed quite short running times for the PHP scripts, which are not so possible on an Amiga 68040 with Triki Wiki (although some improvements can be made there too!). So, I changed these constants:

Changed Constants (in seconds)
Constants Old Values New Values
CGI_MAX_HEADERS_LENGTH 32768 0
CGI_TIMELIMIT 30 90
IDLE_READ_TIMELIMIT 60 x5
IDLE_KEEPALIVE_TIMELIMIT 4 x5
IDLE_SEND_TIMELIMIT 300 x5
IDLE_SEND_RESP_TIMELIMIT 45 x5
LINGER_TIME 1 x5
MIN_REAP_TIME 30 90
MAX_REAP_TIME 90 900

 

Also, THTTPd tended to crash quite often and regularly. It seems that robots were overloading THTTPd with their senseless requests (worrying about energy consumption, anyone?). I added this robots.txt file to the Web root directory to calm them down...

robots.txt
User-agent: dotbot
Disallow: /

User-agent: serpstatbot
Disallow: /

User-agent: *
Crawl-delay: 30


Now, I am hosting a Web page and this very wiki on my Amiga 1200!


The last three changes:

Tygre - 2020-01-04 03:02:13 pm  |  Tygre - 2016-06-18 06:36:47 pm  |  Tygre - 2015-05-09 10:10:11 am