Presentation is loading. Please wait.

Presentation is loading. Please wait.

Initial web server configuration Dr Jim Briggs 1WUCM1.

Similar presentations


Presentation on theme: "Initial web server configuration Dr Jim Briggs 1WUCM1."— Presentation transcript:

1 Initial web server configuration Dr Jim Briggs 1WUCM1

2 Overview Planning Testing the OS/Environment – IP setup Installation Configuration – Simple minimum details Testing – Default website – with the manuals! WUCM12

3 Apache web server http://httpd.apache.org/ Most commonly used web server software Open source Free to use Based on NCSA httpd software (early 1990s) Current version is 2.2 – 2.0 still supported – 1.3 deprecated – 2.3/2.4 in development The Apache HTTP Server ("httpd") is a project of The Apache Software Foundation (http://www.apache.org/)http://www.apache.org/ WUCM13

4 Installation Three choices for Apache: – From source code – From distributed binaries, for Windows, Linux etc. – As part of a larger package LAMP/WAMP/XAMPP stacks Most Linux distros For Windows the binary is a standard windows installer package WUCM14

5 Configuration Apache is configured using text files – http.conf main Apache server configuration file may "include" other configuration files – mime.types relates media types to file name extensions should never need to change WUCM15

6 Configuration file syntax (1) A hash symbol ( # ) is used to introduce a comment There are two kinds of conf directive: – Variable assignment – Block directive The syntax of a variable assignment is: WUCM16 DocumentRoot "D:/WebRoot/Roger/htdocs"

7 Configuration file syntax (2) A block directive – looks a little like an HTML tag (but isn't) – serves to apply specific directives to specific parts of the Apache system WUCM17 Options none AllowOverride none Order allow, deny Deny from all

8 Minimum basic configuration file WUCM18 # Simple conf file for the web site Roger ServerType standalone ServerRoot "C:/Apache" ServerName "H01.CommsLab.port.ac.uk" DocumentRoot "D:/WebRoot/Roger/htdocs" TransferLog "logs/access.log"

9 Log files Brief example of common: WUCM19 192.168.27.58 - - [10/Feb/2002:17:59:02 +0000] "GET / HTTP/1.1" 200 1494 192.168.27.58 - - [10/Feb/2002:17:59:02 +0000] "GET /apache_pb.gif HTTP/1.1" 200 2326 192.168.27.58 - - [10/Feb/2002:17:59:21 +0000] "GET /manual/ HTTP/1.1" 200 9580 192.168.27.58 - - [10/Feb/2002:17:59:21 +0000] "GET /manual/images/apache_header.gif HTTP/1.1" 200 4084 192.168.27.58 - - [10/Feb/2002:17:59:21 +0000] "GET /manual/images/pixel.gif HTTP/1.1" 200 61 192.168.27.58 - - [10/Feb/2002:17:59:21 +0000] "GET /manual/images/index.gif HTTP/1.1" 200 1540 192.168.27.58 - - [10/Feb/2002:17:59:33 +0000] "GET /manual/windows.html HTTP/1.1" 200 27725 192.168.27.58 - - [10/Feb/2002:17:59:34 +0000] "GET /manual/images/sub.gif HTTP/1.1" 200 6083

10 Apache as a service Apache can be run as a "service" Default in version 2 Implications: – No user interface at all, not even a window! – Started automatically at server boot – Stopped automatically at shutdown – You may need to remove from "service list" to use a manual console WUCM110

11 Apache as a console application Start – From Start menu – assuming install ok – From a command prompt: httpd.exe Stop – Control-C – httpd.exe –k shutdown from another window WUCM111

12 Apache running from a console WUCM112

13 Default web site WUCM113

14 Apache topics to read up on Authentication, Authorization, and Access Control CGI: dynamic content – suEXEC support Virtual hosts Content negotiation Log files WUCM114


Download ppt "Initial web server configuration Dr Jim Briggs 1WUCM1."

Similar presentations


Ads by Google