All/ Hier liegen Plattform-spezifische Unterverzeichnisse mit Make-Files BUILD* Skript zum "Bauen" der Software (C-Shell) BUILD.SH* dito, Bourne-Shell Daemon/ Source-Files und Objekte für den Server ICE/ Zusätzliche Index-Software in Perl Library/ Source-Files und Objekte für die Library LineMode/ Source-Files und Objekte für den Linemode-Browser Makefile wird aus BUILD aufgerufen README Anleitung server_root/ Beispiel-Dateibaum für den ServerAngepaßte Make-Files gibt es für folgende Plattformen:
isc3.0/ rs6000/ sun4/ linux/ sco/ sun4-sol2/ apollo_m68k/ ncr/ sgi/ unisys/ aux/ next/ sinix/ unix/ convex/ next-386/ snake/ uts2/ decstation/ osf1/ src/ uts4/ dell/ pyramid/ sun3/ vax_ultrix/(Convex und Sinix sind hier eigene Ergänzungen.)
Wenn die eigene Plattform unterstützt wird, genügt es, BUILD aufzurufen; die erzeugten Programme liegen nach erfolgreichem Ablauf unter Daemon/plattform:
HTAAFile.o HTCacheInfo.o HTPasswd.o HTUserInit.o cgiutils.o HTAAProt.o HTConfig.o HTRFC931.o HTWild.o htadm* HTAAServ.o HTDaemonDIR.o HTRequest.o HTgc.o htimage* HTACL.o HTGroup.o HTRetrieve.o HTims.o httpd@ HTAdm.o HTLex.o HTSInit.o Makefile httpd_3.0* HTAuth.o HTLoad.o HTSUtils.o cgiparse* HTCache.o HTLog.o HTScript.o cgiutils*
cgi-bin/ Der Platz für Programme. Skripts, die Dokumente erzeugen. cgiparse* Ein Hilfsprogramm für Shell-Skripts in cgi-bin z.B. zum Zerlegen von Formulareingaben. cgiutils* dito, zum Erzeugen von HTTP-Headern. config/ Platz für alternative Konfigurationsdateien. htadm* Hilfsprogramm zum Pflegen von Passwort-Dateien. htimage* Programm zur Verarbeitung von Image-Map-Dateien zu "clickable Images" (gehört auch nach cgi-bin). httpd* Das Server-Programm selbst. httpd-pid Wird von httpd angelegt, um seine PID abzuspeichern. httpd.conf Die aktuellle Konfigurationsdatei. icons/ Verzeichnis mit Icons z.B. für die von httpd erzeugten Directory-Listings. logs/ Platz für die Log-Dateien des Servers.
# # Configuration file for cern_httpd on hermes.rz.uni-duesseldorf.de # # IMPORTANT: # Default values are in {curly braces} values that you need to # provide are in <angle brackets>, but braces and brackets are # *NOT* part of the syntax! # # See: # http://www.w3.org/hypertext/WWW/Daemon/User/Config/Overview.html # # for more information. # # # *** GENERAL SETTINGS/DIRECTIVES *** # ServerRoot /usr/local/etc/WWW HostName www.rz.uni-duesseldorf.de ServerType StandAlone Port 80 PidFile httpd-pid UserId ftp GroupId ftpadms Protection PROXY-PROT { ServerId Proxy.rz.uni-duesseldorf.de Mask @(*.uni-duesseldorf.de, 134.99.*.*, *.fh-duesseldorf.de, 193.23.168.*, 193.23.169.*, 193.23.170.*, 193.23.171.*, 192.166.32.*) } Protect * PROXY-PROT # # Pass the URLs that this proxy is willing to forward. # Pass http:* Pass ftp:* Pass gopher:* # Default protection for own documents: public to anyone # Protection NO-PROT { ServerId WWW.rz.uni-duesseldorf.de Mask @(*, *.*.*.*) } Protect /* NO-PROT Protection UNI-FH { ServerId www.rz.uni-duesseldorf.de GetMask @(*.uni-duesseldorf.de, 134.99.*.*, *.fh-duesseldorf.de, 193.23.168.*, 193.23.169.*, 193.23.170.*, 193.23.171.*) } Protection UNI { ServerId www.rz.uni-duesseldorf.de GetMask @(*.uni-duesseldorf.de, 134.99.*.*) } Protect /WWW/UniFH/* UNI-FH Protect /WWW/Uni/* UNI Protect /WWW/ZCL/Uni/* UNI # #Enable {GET HEAD POST} #Disable {all others} #IdentityCheck {Off} #Welcome {Welcome.html welcome.html index.html} #AlwaysWelcome Off UserDir public_html #MetaDir {.web} #MetaSuffix {.meta} #MaxContentLengthBuffer {50 K} # # *** URL TRANSLATION RULES *** # #Redirect /some_url/* http://some_server/some_url/* Exec /htbin/* /usr/local/etc/WWW/htbin/* Exec /cgi-bin/* /usr/local/etc/WWW/cgi-bin/* Map /www/d/* /WWW/D/* Pass /icons/* /usr/local/etc/WWW/icons/* Pass /ftp/* /home/ftp/* Pass /* /home/gopher/* # # *** FILENAME SUFFIX DEFINITIONS *** # #AddType <.suffix> <representation> <encoding> [<quality>] #AddEncoding <.suffix> <encoding> #AddLanguage <.suffix> <encoding> #SuffixCaseSense {Off} # # *** ACCESSORY SCRIPTS *** # #Search <search_script_pathname> #Post-Script <post_handler_pathname> #Put-Script <put_handler_pathname> #Delete-Script <delete_handler_pathname> # # *** DIRECTORY LISTINGS *** # DirAccess Selective #DirReadme {Top} #FTPDirInfo {Top} #DirShowIcons {On} #DirShowBrackets {On} #DirShowMinLength {15} #DirShowMaxLength {25} #DirShowDate {On} #DirShowSize {On} #DirShowBytes {Off} #DirShowHidden {Off} #DirShowOwner {Off} #DirShowGroup {Off} #DirShowMode {Off} #DirShowDescription {On} #DirShowHTMLTitles {On} #DirShowMaxDescrLength {25} #DirShowCase {Off} # # *** DIRECTORY ICONS *** # #AddIcon <icon_url> <alt_text> <url_template> #AddBlankIcon <icon_url> <alt_text> <url_template> #AddUnknownIcon <icon_url> <alt_text> <url_template> #AddDirIcon <icon_url> <alt_text> <url_template> #AddParentIcon <icon_url> <alt_text> <url_template> # # *** LOGGING *** # (relative to ServerRoot if doesn's start with slash) # AccessLog logs/http.log #ProxyAccessLog logs/proxy.log CacheAccessLog logs/http_cache.log ErrorLog logs/http.error LogFormat Common #LogTime {LocalTime} #NoLog <url_template> # # *** TIMEOUTS *** # #InputTimeOut {2 mins} #OutputTimeOut {20 mins} #ScriptTimeOut {5 mins} # # *** PROXY CACHING *** # # # Enable caching, specify cache root directory, and cache size # in megabytes # Caching On CacheRoot /mnt/home/tmp CacheSize 240 M # # Specify absolute maximum for caching time # CacheClean * 2 months # # Specify the maximum time to be unused # CacheUnused http:* 2 weeks CacheUnused ftp:* 1 week CacheUnused gopher:* 1 week # # Specify default expiry times for ftp and gopher; # NEVER specify it for HTTP, otherwise documents generated by # scripts get cached which is usually a bad thing. # CacheDefaultExpiry ftp:* 10 days CacheDefaultExpiry gopher:* 2 days NoCaching http://gopher.rz.uni-duesseldorf.de/* NoCaching http://www.rz.uni-duesseldorf.de/* NoCaching http://www.uni-duesseldorf.de/* NoCaching http://ftp.uni-duesseldorf.de/* NoCaching http://*.rz.uni-duesseldorf.de/* #CacheOnly <url_template> #CacheDefaultExpiry <url_template> <time_period> #CacheLastModifiedFactor <factor>/<Off> #KeepExpired {Off} #CacheTimeMargin <time_period> #CacheNoConnect {Off} #CacheExpiryCheck {On} #Gc {fn(Caching)} #GcDailyGc <time>/<Off> #GcMemUsage {500} #CacheLimit_1 {200 K} #CacheLimit_2 {4000 K} #CacheLockTimeOut <fn(>OutputTimeOut)> # # *** HANDLING MULTIPLE PROXIES *** # #HTTP_proxy <outer_proxy_server> #FTP_proxy <outer_proxy_server> #Gopher_proxy <outer_proxy_server> #WAIS_proxy <outer_proxy_server> #no_proxy <outer_proxy_server>
/usr/local/etc/WWW/httpd -r /usr/local/etc/WWW/httpd.conf
Einzig notwendiges Argument ist der Pfadname der Konfigurationsdatei; dieser
muß absolut angegeben werden.
(Vollständige
Liste der Kommandozeilen-Optionen von httpd.)Dies muß mit Superuser-Berechtigung erfolgen, wenn der httpd
./httpd -v -r /usr/local/etc/WWW/httpd.conf
oder mit nicht-privilegierter Portnummer:
./httpd -v -p 8080 -r /usr/local/etc/WWW/httpd.conf
In der umfangreichen Ausgabe des Programms läßt sich u.a.
ablesen, wie URLs von angeforderten Dokumenten in reale Pfadnamen auf
dem Unix-System übersetzt werden.
Client-seitig geht der Test gut mit Telnet - ohne einen WWW-Browser:
telnet www 80
HEAD / HTTP/1.0
Die Eingabezeile (HTTP-Request) muß mit CR und LF
(Control-J) abgeschlossen werden.
Individuelle Zugriffsrechte auf einzelne Dokumente setzen eine Access Control List (ACL) voraus - eine Datei Namens .www_acl im selben Verzeichnis wie die Dokumente mit Einträgen für alle zugreifbaren - sowie eine Validierung einer HTTP-Server-bezogenen Userid mit einem Passwort über eine spezielle Passwort-Datei. Näheres siehe in der vollständigen Dokumentation.