Nun, die Apache-Config ist zwar Recht gut kommentiert, allerdings kann sie einem Anfänger trotzdem Probleme bereiten.
Hier eine Kurzanleitung für Apache und PHP4:
PHP4 in den Pfad C:/php installieren.
Pfad zum Interpreter sollte denn C:/php/php.exe sein.
Jetzt Apache (ich verwende Version 1.3.20) installieren, einfache Standardinstallation wahrscheinlich ins Verzeichnis C:/Apache Group/Apache (kann so bleiben).
Im Windows Startmenü dürfte jetzt ein Menüpunkt "Start Apache in Console" zu finden sein. Darauf öffnet sich ein DOS-Fenster mit dem Inhalt "WIN32 Apache running..." oder so ähnlich.
Jetzt ein Browserfenster öffnen und
http://localhost eintippen. Jetzt sollte eine Begrüssungs-HTML-Seite zu sehen sein. Damit läuft der Server schonmal in der Grundkonfiguration.
Für PHP machen wir jetzt folgendes:
Windows-Explorer ins Verzeichnis C:/Apache Group/Apache/conf und die datei "httpd.conf" öffnen.
Suche jetzt folgendes (etwa in der Mitte):
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "C:/Apache Group/Apache/cgi-bin/"
und füge direkt darunter dies ein:
ScriptAlias /php/ "C:/php/"
Suche jetzt dies (weiter unten):
# And for PHP 4.x, use:
#
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source .phps
und füge direkt darunter dies ein:
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
Zum Schluss dies:
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#
und schreibe darunter dies rein:
Action application/x-httpd-php "/php/php.exe"
Jetzt Apache neu starten und PHP-Support dürfte laufen.
Zum Testen kannst du folgende Datei erstellen (nenne sie z.B. phptest.php):
<?php
phpinfo();
?>
Kopiere diese Datei ins Verzeichnis C:/Apache Group/Apache/htdocs
und tippe im Browser
http://localhost/phptest.php ein.
Siehst du jetzt Infos zu deiner PHP-Version, hat alles geklappt!
Für OmniHTTPd hab ich sogar ein Tut online gestellt:
http://members.tripod.de/DrPrimus/HTML-Kurs/Kurs/perl4.htm