1 / 22

Setting up a Web server

Setting up a Web server. Setting up basic services ... Web server maintenance ... More features. Setting up basic services. Pre-compiled server Source + compilation Site-specific configuration Installing the server Starting the server Mapping URLs to documents ... Testing the server

Download Presentation

Setting up a Web server

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Setting up a Web server • Setting up basic services ... • Web server maintenance ... • More features ...

  2. Setting up basic services ... • Pre-compiled server • Source + compilation • Site-specific configuration • Installing the server • Starting the server • Mapping URLs to documents ... • Testing the server • Setting up home pages ... • Public access conventions ... • Announcing server ...

  3. httpd (NCSA) subdirectories ... • cgi-bin • conf • icons • logs • support

  4. Mapping URLs to documents ... • Minimal URL to reach server: http://server-name ... • Different port: http://server-name:port_number ... • URL --> real dir translation ...

  5. Minimal URL to reach server: http://server-name ... • No directory path / filename ==>server returns • index.html in ServerRoot directory or (if no file) • directory index (like ls -1)

  6. Different port: http://server-name:port_number ... • Append virtual name of document (except root-dir index) • Path to doc (not absolute)

  7. URL --> real dir translation ... • Virtual dir in beg. URL path? (def'd in Alias / ScriptAlias in srm.conf) • Yes: replace vir. dir. w/real dir. • Prefix of /~user-name? • Yes: ~user-name/public_html/<file> • Doesn't exist ==> error • Else DocumentRoot at beg. Path • Alias, ScriptAlias, UserDir directives in srm.conf ....

  8. Alias, ScriptAlias, UserDir directives in srm.conf .... • Virtual directory • E.g., • Alias /icons /usr/local/etc/httpd/icons/ • http://server-name/icons/mybitmap.xbm ==> • /usr/local/etc/httpd/icons/mybitmap.xbm

  9. Setting up home pages ... • home.html • Single / in various directories • Sign: hyperlink to HTML signature page at bottom • Every page • Date: creation / modification • Every page; automate • Status: Stable / under construction

  10. Public access conventions ... • Server name starts w/ www. • E-mail alias for comments, tips, requests etc. • webmaster alias: webmaster@domain-name

  11. Announcing server ... • Info ... • Announce to ...

  12. Info ... • Owner • Contents • Status • URL

  13. Announce to ... • www-announce@www0.cern.ch • comp.infosystems.announce • www-request@info.cern.ch • whats-new@ncsa.uiuc.edu

  14. Web server maintenance ... • Updating HTML documents • Managing log files • Moving directory structures • Mirroring documents and servers ... • HTTP logs and log analysis ...

  15. Mirroring documents and servers ... • htget Perl script: get HTML non-interactivel from Web server • Duplicate part or all of another host's dir tree

  16. HTTP logs and log analysis ... • Two log files (in ServerRoot dir.) • Error log (logs/error_log) • Transfer log (logs/access_log)

  17. More features ... • Adding MIME types ... • Enabling server-side includes ... • Automatic directory indexing ...

  18. Adding MIME types ... • Multipurpose Internet Mail Extensions • E.g., text/plain, text/html, image/gif, video/quicktime, application/postscript • New: leading x- • E.g., application/x-http-cgi, text/x-server-parsed-html • Adding ...

  19. Adding ... • AddType • AddEncoding • DefaultType • E.g., identify HTML documents • First line of file contains <HTML> • Filename ends with .html • .htm (DOS 8.3 filename) • AddType text/html htm

  20. Enabling server-side includes ... • Files • Values of environment variables • Dates, doc sizes, authors, HTML in multiple docs. • Examples (see my homepage) • Not enabled by default in httpd ... • Security issues ...

  21. Not enabled by default in httpd ... • Enable: server-wide / per directory • Options Includes (or IncludesNoExec) in access.conf • Which files get includes inserted • Almost every file • srm.conf: AddType text/x-server-parsed-html .html • Sparingly • Define new file extension for files needing processing • AddType text/html shtml • AddType text/x-server-parsed-html .shtml

  22. Security issues ... • IncludesNoExec more secure than Includes • More later

More Related