The installation with Apache 1.2 is really simple, because mod_rewrite is already an integral part of the distribution. The following steps are necessary:
1. Unpack the Apache distribution with:
$ gunzip < apache_1.2.x.tar.gz | tar xvf -
$ cd apache_1.2.x/src
2. Remove the comment character ('#') from the following line:
#Module rewrite_module mod_rewrite.o
3. Configure and compile Apache:
$ ./Configure $ make
Using the older version 1.1.1 of the Apache Web server with mod_rewrite is also possible. However, in that case some more changes are necessary:
1. Unpack the Apache distribution with:
$ gunzip<apache_1.1.1.tar.gz | tar xvf - $ gunzip<mod_rewrite-2.3.3.tar.gz | tar xvf -
2. Copy the mod_rewrite files into the Apache source directory
$ cp mod_rewrite-2.3.3/mod_rewrite.c $ apache_1.1.1/src/ $ cp mod_rewrite-2.3.3/mod_rewrite.h $ apache_1.1.1/src/ $ cp mod_rewrite-2.3.3/apache-1.1.x/ $ mod_negotiation.c.diff apache_1.1.1/src/ $ cp mod_rewrite-2.3.3/apache-1.1.x/util_script.c. $ diffapache_1.1.1/src/ $ cp -r mod_rewrite-2.3.3/apache-1.1.x/regexp $ apache_1.1.1/src/
3. Remove two errors that can lead to problems in relation to CGI programs and the proxy module (they have already been removed from Apache 1.2).
$ cd apache_1.1.1/src $ patch<mod_negotiation.c.diff $ patch<util_script.c.diff
4. Edit the configuration file to put in the mod_rewrite module and the RegExp library.
EXTRALIB= regexp/libregexp.a : Module rewrite_module mod_rewrite.o
5. Configure and compile Apache:
$ ./Configure $ cd regexp $ make $ cd .. $ make
Dieser Text ist der Zeitschriften-Ausgabe 12/1996 von iX entnommen.
iOS, Android, Windows Phone 7 und HTML5 - das neue Sonderheft von heise Developer führt Einsteiger und Profis in die Programmierung mobiler Geräte ein.