December 2002
Intermediate to advanced
588 pages
25h 57m
English
To illustrate mod_reveal.c in use, we used the following configuration:
Listen 9001 Listen 9000 TransferLog /home/ben/www/APACHE3/book/logs/access_log ErrorLog /home/ben/www/APACHE3/book/logs/error_log RevealTag MainDir RevealServerTag MainServer <LocationMatch /.reveal> RevealTag Revealer SetHandler reveal </LocationMatch> <VirtualHost *:9001> DocumentRoot /home/ben/www/APACHE3/docs RevealTag H1Main RevealServerTag H1 <Directory /home/ben/www/APACHE3/docs/protected> RevealTag H1ProtectedDirectory </Directory> <Location /protected> RevealTag H1ProtectedLocation </Location> </VirtualHost> <VirtualHost *:9000> DocumentRoot /home/camilla/www/APACHE3/docs RevealTag H2Main RevealServerTag H2 </VirtualHost>
Note that the <Directory> and
<Location> sections in the first virtual
host actually refer to the same place. This is to illustrate the
order in which the sections are combined. Also note that the
<LocationMatch> section
doesn’t have to correspond to a real file; looking
at any location that ends with .reveal will
invoke mod_reveal.c ’s handler.
Starting the server produces this on the screen:
bash$ httpd -d ~/www/APACHE3/book/ CreateServer: server=(none):0 CreateDir : dir=(none) PreConfig [2.0] Tag : new=MainDir dir=(none) server=(none):0 tag=(none) ServerTag : new=MainServer server=(none):0 stag=(none) CreateDir : dir=/.reveal Tag : new=Revealer dir=/.reveal server=(none):0 tag=MainServer CreateDir : dir=(none) CreateServer: server=(none):9001 Tag : new=H1Main dir=(none) ...
Read now
Unlock full access