Web Server Apache What is the Web Server
Web Server Apache
What is the Web Server? • Web server is not a hardware platform, it is a software program allowing customers access in Web pages • Web server is able to interpret requests HTTP arriving on the port using protocol HTTP, and respond with this same protocol -- In the Unix world this program is called an HTTP daemon -- In the Windows NT world the program is known as an http service
Functions of the Web Server • Provide access control, determining who can access particular directories or files on the Web server • Run scripts and external programs to either add functionality to Web documents or provide real-time access to databases and other dynamic data • Enable administration of both the server functions and the contents of the Web site • Log transactions that the users make
How a Web Server Works • Information on web identified using a URL – Uniform Resource Locator • Browser requests information from the Web server combined with HTTP – Hyper Text Transfer Protocol • Web Server returns information to browser in HTML format – Hyper Text Markup Language
Internet HTTP Request: http: //www. ecomm. dal. ca/mec/index. html HTML Response: Web Client (Browser) Web Sever Welcome Local File System
SEVER Executable Portion HTTP Request HTML Web Sever Application Layer Server Script or Program Response Web Client (Browser) Data Layer Data Stores Web Architecture
Web Servers are distinguished by: • Platforms: Some are designed for Unix / Linux Platform, others for Windows NT, and others for a variety of platforms • Performance: There are significant differences in the processing efficiency of various servers, as well as the number of simultaneous requests they can handle and the speed with which they process those requests • Security: In addition to simple access control, some servers provide additional security services like support for advanced authentication. • Commerce: Some servers provide advanced services that support online selling and buying.
Commercial Web Servers • Apache Server • Microsoft’s Internet Information Server (IIS) • Netscape’s Enterprise Server
Introduction of Apache • Apache is a free web server for modern operating systems including Unix / Linux and Windows NT. It is a secure, efficient and extensible server provides HTTP services in sync with the current HTTP standards. • Apache is the leading internet web server, it has evolved from one of first web server programs -NCSA, and has been the most popular web server on the Internet since April of 1996. • Apache-This word was developed from: “a patchy server”
The following websites use Apache or derivatives: Amazon. COM ; Yahoo! ; W 3 Consortium ; Financial Times ; Apple ; MP 3. com ; Stanford etc.
Versions of Apache • Apache 0. 62 -- was first public in April 1995 • Apache 1. 0 -- issued in December 1995 • Apache 2. 0 -- was released in April 2002 New features of Apache 2. 0: • filters, allow modules to process content generated by other modules; they can encrypt, scan for viruses or compress not only static files but dynamically generated content • Multi-protocol architecture, allows Apache to serve other protocols, such as POP 3 and so on • Improved support for non-Unix platforms, such as Windows, using the Apache Portable Runtime and platform-specific multiprocessing modules Apache is regarded as having few known faults now, as soon as a bug or a fault of safety is detected, those are quickly corrected and a new version of the application is published
Main Files of Apache • httpd, the server program • httpd. conf, main configuration file. – /usr/local/apache/conf – /etc/httpd/conf • access_log, log of all accesses –. . /logs • Error_log, log of all errors –. . /logs • httppd. pid, contains process id of running server program
Apache Configuration • Apache is configured by placing directives in plain text configuration files. The main configuration file is usually called httpd. conf. The location of this file is set at compile -time, but may be overridden with the -f command line flag. • The Apache Configuration Tool allows you to configure the /etc/httpd/conf/httpd. configuration file for your Apache Web server. Through the graphical interface, you can configure Apache directives such as virtual hosts, logging attributes, and maximum number of connections.
How to Use Apache Configuration Tool 1. Configure the basic settings under the Main tab 2. Click on the Virtual Hosts tab and configure the default settings 3. If you want to serve more than one URL or virtual host, add the additional virtual hosts 4. Configure the server settings under the Server tab 5. Configure the connections settings under the Performance Tuning tab 6. Copy all necessary files to the Document Root and cgi-bin directories, and save your settings in the Apache Configuration Tool Graphic interface under Unix / Linux
Configure the Basic Server Settings • • • Enter a fully qualified domain name that you have the right to use in the Server Name text area. It does not have to be the domain name resolved from the IP address of the server. Enter the email address of the person who maintains the Web server in the Webmaster email address text area. Use the Available Addresses area to define the ports on which Apache will accept incoming requests. Click the Add button to define additional ports on which to accept requests. A window as show as the below one: Choose the Listen to all addresses option to listen to all IP addresses on the defined port ; specify a particular IP address over which the server will accept connections in the Address field, default port of http is “ 80” Clicking the Edit button shows the same window as the Add button except with the fields populated for the selected entry. To delete an entry, select it and click the Delete button
Security of Apache • • Security There are several solutions that provide secure transactions for Apache servers. This enables Apache servers to be used for ecommerce or other scenarios where sensitive information is exchanged (like credit card numbers). Authentication modules allow you to determine the identity of a client, usually by verifying an username and password against a backend database. Apache includes modules to authenticate against plain text and database files. Access Control Apache provides the mod_access module that can restrict access to resources based on parameters of the client request, such as the presence of a specific header or the IP address or hostname of the client. Third party modules allow you to restrict access to clients that misbehave, as explained in later sections on performance and bandwidth control. SSL/TLS The Secure Sockets Layer/Transport Layer Security protocols allow data between the Web server and client to be encrypted.
Advantage • The Apache license: It is an open source, allows for both commercial and non-commercial uses of Apache • Modular architecture: Apache users can easily add functionality or tailor Apache to their specific environment • Portable: Apache runs on nearly all flavors of Unix (and Linux), Windows, mainframes. . . • Robustness and security
Disadvantage • Less compatible with Windows system than some others
Reference • C. Di. Bona, S. Ockman, and M. Stone, 1999, Open Sources: Voice from the Open Source Revolution. Sebastopol, CA: O'Reilly • E. S. Raymond, “The Cathedral and the Bazaar, ” http: //www. tuxedo. org/~esr/writings/cathedral-bazaar/ • P. Vixie, 1999“Software Engineering, ” in Open Sources: Voices from the Open Source Revolution, C. Di. Bona, S. Ockman, and M. Stone, Eds. Sebastopol, CA: O'Reilly, 1999, pp. 91 -100. • Apache HTTP Server , “Overview of New Features in Apache 1. 3, ” 2003, http: //httpd. apache. org/ docs/ new_features_1_3. html • Apache HTTP Server, “Overview of New Features in Apache 2. 0, ” 2003, http: //httpd. apache. org/docs-2. 0/new_features_2_0. html
Thank You Deng Wei Oct, 2003
Web Client Internet Explorer ; Netscape Navigator • Issues request – – URL Get / Post MSG • Display and Present data • Support Scripting – – • Java script VB script Support Programs – – Flash etc. Java applets
Web Server • Get request • Locate data • Send back data to client
Executable Portion enable you to do : • Collect Information from the user and store the information on the server • Perform tasks for the user such as placing an order for a product, performing complex calculations, or retrieving information from a database • Identify a specific user and present an interface that is customized for him or her • Present content that is highly volatile, such as Inventory, pending order, and shipment information
Access Control • Parameter of “allow” and “deny” : control access • Parameter of “order”: control the implement order of “allow” and “deny”. If your setting is: order allow, deny allow from all deny aaa. com In this way, all computers can be acceded, except which come from aaa. com On the contrary, If your setting as this: order deny, allow deny from allow from 11. 23. 44 It means all accesses are denied, except 11. 23. 44 IP(11. 23. 44. 03/11. 23. 44. 07 ) can be acceded
- Slides: 25