Unit-5 Chap-1 Configuring Web Server

Slides:



Advertisements
Similar presentations
What all is there Inside the Apache web server. These slides are part of study material of LAMP course. Course conducted by Prof Rocky Jagtiani – Technical.
Advertisements

Web Server Onno W. Purbo Web server.
Dan Fleck.  WAMP – Windows Apache MySQL PHP -  LAMP – Linux Apache MySQL PHP ◦ There are.
20-753: Fundamentals of Web Programming 1 Lecture 11: Web Server Case Study Fundamentals of Web Programming Lecture 11: Web Server Case Study.
Chapter Apache Installation on Linux. Acknowledgement The contribution made by Darrin Morison is acknowledged.
COEN 445 Communication Networks and Protocols Lab 4
Apache Installation by Jack Davis. Web Servers The Apache HTTP Server is the most widely used web server on the Internet. Apache is fast, free, and full-featured.
Apache Configuration Setting up a web server. Basic Server Facts Runs on port 80 Server application -> httpd Richly configurable Many defaults will let.
Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from
Configuring a Web Server. Overview  Understand how a Web server works  Install IIS (Internet Information Services) and Apache Web servers  Examine.
CP476 Internet Computing Browser and Web Server 1 Web Browsers A client software program that allows you to access and view Web pages on the Internet –Examples.
Apache : Installation, Configuration, Basic Security Presented by, Sandeep K Thopucherela, ECE Department.
1 Web Servers Web Protocols and Practice Chapter 4.
APACHE SERVER By Innovationframes.com »
Apache httpd Web Server C. Edward Chow. Advanced Internet & Web Systems chow2 Outline of the Talk Introduction to Apache httpd web server Basic Compilation,
Chapter 22 Web Hosting and Internet Servers Xuanxuan Su.
Virtual Hosts The apache server can handle multiple “web sites” at a time – a web service provider company may have multiple different sites to offer (see.
Linux Operations and Administration
Appendix: Installing AMP (Apache + MySQL + PHP). Training Course, CS, NCTU 2 AMP  AMP A – Apache Web Server M – MySQL Database Server P – PHP Language.
Web Server Configuration Alokes Chattopadhyay Computer & Informatics Centre IIT Kharagpur.
The Linux Operating System Lecture 5: Apache Tonga Institute of Higher Education.
A Practical Guide to Fedora and Red Hat Enterprise Linux Unit 10: Basic Apache Configuration and Management Chapter 26: Apache (httpd): Setting Up a Web.
Apache Setting up a Web (httpd) server. Apache Apache is the utility used by Linux servers to provide Web services (http services). It is the most popular.
Web Servers Installation and Configuration May 24, 2001 CIS System Administration Problem Statement The class topic is setting up a Linux server to support.
Apache Server The Apache Server Apache is a WWW server that implements the HTTP protocol. Apache runs as a daemon. This means that it is a resident.
Web Servers1-1 Web Servers Xingquan (Hill) Zhu
Configuring Apache Downloading, compiling and installing apache is straightforward and even someone easy The real effort is to properly configure apache.
An introduction to Apache. Different Types of Web Servers Apache is the default web server for may Unix servers. IIS is Microsoft’s default web server.
Apache httpd Web Server C. Edward Chow. Advanced Internet & Web Systems chow2 Outline of the Talk Introduction to Apache httpd web server Basic Compilation,
Apache, PHP, MySQL Installation and configuration Web Programming with PHP,TITAS PROJECTIICT,BUET.
Setting up NIS and HTTP. Network Information Service Reading: 1. Linux NIS HOWTO: howto/HOWTOhttp://
Microsoft Internet Information Services 5.0 (IIS) By: Edik Magardomyan Fozi Abdurhman Bassem Albaiady Vince Serobyan.
Web Services CSCI N321 – System and Network Administration Copyright © 2007,2008 by Scott Orr and the Trustees of Indiana University.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Internet Information Server © N. Ganesan, Ph.D. All Rights Reserved.
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG 11 Kigali, Rwanda May 2010 Dorcas Muthoni Courtesy: Hervey Allen.
Apache Web Server. Aim of this section –Introduce you to workings of the most common webserver –Give you a little experience in role of webmaster Configuring.
Apache, MySQL and PHP Installation and Configuration Chapter 1 Apache Installation and Configuration.
Apache Web Server Administration Syed Iqbal Syed Iqbal.
Cosc 4750 Configuring httpd, Mysql, And Samba. defaults By default httpd demean will startup and work User directories are turned off Default directory.
1 Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG X Cairo, Egypt May 2009 Hervey Allen.
What's Apache? Apache is open source, powerful, free and runs on more than half of all Internet servers. Let's take a quick look at how to get your Apache.
LinuxChix Apache. Serving Webpages The layer 7 protocol (HTTP) is what our browsers talk to get us the websites we can't seem to live without. HTTP is.
Multi-Domain Hosting Hosting multiple domains on one server using Apache John Beckett 1/16/2013.
Apache Global Configuration Apache MPM (multi-processing modul) Common Directives.
Web Server (Apache httpd ) 1. 2 Apache Web Server A PAtCHy server: developed by the Apache group History- First.
More than one site? Use multiple configuration files Use multiple configuration files  httpd –d {path}  Assumes “conf/httpd.conf” Logging transactions.
Web Server Administration Chapter 6 Configuring a Web Server.
CITA 310 Section 5 Virtual Hosts and Virtual Directories (Selected Topics from Textbook Chapter 6)
Apache Web Server Architecture Chaitanya Kulkarni MSCS rd April /23/20081Apache Web Server Architecture.
APACHE -By V.Gouthaman. The Apache HTTP Server, commonly referred to as Apache is web server software notable for playing a key role in the initial growth.
Presented by Lonnye Bower Fardin Khan Chris Orona APACHE WEB SERVER.
IBM Http Server Basic Administration. CONTENTS Web server IHS How does IHS differ from Apache Basic configurations Advanced Configurations Performance.
CITA 310 Section 4 Apache Configuration (Selected Topics from Textbook Chapter 6)
Institute for Visualization and Perception Research 1 © Copyright 1998 Haim Levkowitz Setting up a Web server Setting up basic services... Web server maintenance...
Apache Web Server. Outline of the Talk : Introduction to Apache httpd web server Basic Compilation, Installation and Configuration Performance Features:
Web Server Administration Chapter 6 Configuring a Web Server.
Apache Configuration. Application Install IBM HTTP Server is Apache.
Web and Proxy Server.
Chap-I Network and System Configuration in Linux
The features of Apache Apache’s qualities are its speed, configuration, stability, and rich features set . Apache is easy to configure & easy to reconfigure.
Web Protocols and Practice
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess
Unix System Administration
DHCP server & Client Objectives Contents
LINUX ADMINISTRATION 1
Apache Web Server A PAtCHy server: developed by the Apache group formed 2/95 around a number of people who provided patch files for NCSA httpd 1.3 by Rob.
Enabling CGI & PHP With Apache
APACHE WEB SERVER.
Web Servers (IIS and Apache)
Presentation transcript:

Unit-5 Chap-1 Configuring Web Server Created by : Ashish Shah, J.M. PATEL COLLEGE Unit-5 Chap-1 Configuring Web Server

Created by : Ashish Shah, J.M. PATEL COLLEGE Apache Server The Apache Web server is the most popular Web server on the planet. Individuals and organizations use Linux primarily to create an inexpensive and stable Web server. The Apache Web server’s origins are the National Center for Supercomputing Applications (NCSA) HTTP server.

Apache transmits a document according to a client’s request. Created by : Ashish Shah, J.M. PATEL COLLEGE HOW APACHE WORKS? Apache transmits a document according to a client’s request.

Created by : Ashish Shah, J.M. PATEL COLLEGE Configuring Apache It is done in /etc/httpd/conf/httpd.conf file under 3 section : 1) config. Apache’s global characteristics 2) config. Of primary or default server 3) config. Of virtual hosts.

Apache’s configuration-sec-1 Created by : Ashish Shah, J.M. PATEL COLLEGE Apache’s configuration-sec-1 Depending on the installation profile you chose when you installed Fedora Core or RHEL, Apache might or might not be installed. To find out, use the rpmquery command shown in the following example. If the output is similar, Apache is installed: $ rpmquery httpd{,-{manual,devel }} httpd-2.0.54-7 httpd-manual-2.0.54-7 httpd-devel-2.0.54-7

Apache’s configuration-sec-1 Created by : Ashish Shah, J.M. PATEL COLLEGE Include conf.d/*.conf Includes the contents of the files in conf.d/ whose names end in .conf KeepAlive Off If set to On, maintains an open connection to a remote client in the absence of direct contact for the time specified by KeepAliveTimeout KeepAliveTimeout 15 Sets the number of seconds permitted to elapse between direct requests from the same client on the same connection before the server will close the connection (applies if KeepAlive is On) Listen [ipaddress:]80 Determines the combination of IP address and port on which Apache listens for connections; multiple Listen directives may be used LoadModule Links the module or library filename into the modname filename server and adds it to the list of active modules using the name modname MaxClients 256 Sets the maximum number of simultaneous connections supported MaxKeepAliveRequests 100 Sets the number of requests permitted per connection MaxRequestsPerChild 4000 Sets the maximum number of requests each child server fills before terminating MaxSpareServers 20 Defines the maximum number of spare (idle) child servers the master server spawns MinSpareServers 5 Defines the minimum number of spare (idle) child servers permitted PidFile run/httpd.pid Defines the file containing the PID of the master server process, relative to ServerRoot

Apache’s configuration-sec-1 Created by : Ashish Shah, J.M. PATEL COLLEGE ServerLimit 256 Specifies the upper limit on the number of server processes or threads running simultaneously ServerRoot /etc/httpd Defines the top-level directory for Apache’s configuration files and log files ServerTokens OS Defines the contents of the server’s HTTP response header StartServers 8 Defines the number of child servers created when Apache starts Timeout 120 Defines the maximum time in seconds Apache waits for packet send and receive operations to complete

Apache’s configuration-sec-1 (it is w.r.t. fedora’s global config.) Created by : Ashish Shah, J.M. PATEL COLLEGE

Apache’s configuration-sec-2 Created by : Ashish Shah, J.M. PATEL COLLEGE Apache’s configuration-sec-2 Apache has a notion of a default or primary server, which refers to the httpd server that responds to any HTTP requests not handled by virtual hosts, also known as virtual servers. Without going into detail yet, a virtual server or virtual host is an httpd process running on the same machine as the default server, which is distinguished from the primary server by the hostname or IP address assigned to the virtual host. Despite the distinction between primary and virtual servers, configuration directives defined for the primary server also apply to virtual servers unless specifically overridden.

Created by : Ashish Shah, J.M. PATEL COLLEGE Default server config. AccessFileName .htaccess : Lists one or more filenames in the complete path to the requested document that define and control access to documents in each directory or subdirectory at the same level as or below the topmost directory where the file(s) specified by AccessFileName (if any) is found.

Created by : Ashish Shah, J.M. PATEL COLLEGE Default server config. AddCharset charset : Adds the character set charset to Apache’s list of supported character sets AddDefaultCharset : UTF-8 Sets the default output character set Apache uses if no character set is requested by browsers or specified in HTTP request headers AddHandler : handler Associates handler with the MIME type mimetype mimetype AddIcon : icon name Maps icon as the icon to display next to files ending with name; used with the FancyIndexing directive. AddIconByEncoding : Associates icon with files whose MIME icon mimeencoding encoding is mimeencoding; used with the FancyIndexing directive AddIconByType Sets icon as the icon to display next to files icon mimetype with the MIME type of mimetype; used with the FancyIndexing directive

Created by : Ashish Shah, J.M. PATEL COLLEGE Default server config. AddLanguage mimelang : name Maps the filename extension specified by name to the MIME language mimelang, overriding previous mappings for name. AddOutputFilter : Associates an output filter for server output of output mimetype type output with the MIME type mimetype AddType mimetype : name Adds the specified mimetype for files ending in name to the list of MIME types read from the TypeConfig file. Alias urlpath dirpath Maps the directory urlpath, specified relative to DocumentRoot, to the file system directory dirpath enabling Apache to access a directory otherwise inaccessible because all

Created by : Ashish Shah, J.M. PATEL COLLEGE Default server config. DefaultType text/plain : Defines the default MIME type when a requested document’s MIME type cannot be determined using the TypesConfig or AddType directives : <Directory dirname> Delimits a set of configuration directives directives that apply to dirname and its subdirectories, </Directory> if any DirectoryIndex : filename Specifies one or more filenames that can serve as a directory index when a request does not specify a particular file or document DocumentRoot : “/var Sets the base directory from which all /www/html” requested documents will be served; document URLs (filenames) are interpreted relative to DocumentRoot; see also UserDir ErrorLog logs/error _log : Defines the name of Apache’s error log, relative to ServerRoot if the filename does

Apache’s configuration-sec-3 Configuring Virtual Servers Created by : Ashish Shah, J.M. PATEL COLLEGE Apache’s configuration-sec-3 Configuring Virtual Servers Virtual servers (also referred to as virtual hosts) are primarily used to run Web servers for multiple domains on a single physical system. Virtual servers can also be used to allow multiple workgroups or departments that share the same network or subnet to maintain independent Web pages without requiring individual dedicated departmental servers. Virtual hosts fall into two categories: IP-based virtual hosts and name-based virtual hosts.

IP-based virtual hosts and name-based virtual hosts Created by : Ashish Shah, J.M. PATEL COLLEGE IP-based virtual hosts and name-based virtual hosts IP-based virtual hosts refer to Web servers that have different IP addresses. In some cases, the different IP addresses correspond to different Ethernet interfaces, such as eth0 and eth1 (machines that have multiple Ethernet interfaces are called multi homed hosts). In other cases, a single Ethernet interface is assigned multiple IP addresses using aliases.

Virtual Server Configuration Directives Created by : Ashish Shah, J.M. PATEL COLLEGE Virtual Server Configuration Directives <VirtualHost ipaddr[:port] : Defines a virtual host whose IP address is directives addr (listening on port, if specified); </VirtualHost> directives are one or more of the directives listed previously and override the directives listed for the default server. NameVirtualHost ipaddr[:port] Defines the IP address addr (listening on port, if specified) for a name-based virtual host. ServerAlias altname Enables the virtual server to respond to one or more alternate hostnames altname when used with name-based virtual hosts. A single VirtualHost directive can have multiple ServerAlias statements. ServerName fqdn : Sets the name of the virtual server to the FQDN fqdn.

Created by : Ashish Shah, J.M. PATEL COLLEGE A bare-bones set of name-based virtual server definitions might resemble the following: Listen 80 [...] NameVirtualHost *:80 <VirtualHost *:80> ServerName webbeast.example.com DocumentRoot /var/www/webbeast # other directives </VirtualHost> ServerName www.mydomain.com DocumentRoot /var/www/mydomain ServerName www.yourdomain.org DocumentRoot /var/www/yourdomain

Starting and Stopping Apache Created by : Ashish Shah, J.M. PATEL COLLEGE Starting and Stopping Apache To start and stop Apache, the preferred method is to use the httpd initialization script and the service utility, as shown in the following examples: # service httpd start Starting httpd: [ OK ] # service httpd stop Stopping httpd: [ OK ]

Starting and Stopping Apache Created by : Ashish Shah, J.M. PATEL COLLEGE Starting and Stopping Apache The first command stops and restarts the server. The second one sends Apache the SIGHUP signal, which causes it to reread httpd.conf. The effect is the same regardless of which command you use. However, you need to tell Apache which directories contain content it should parse for SSI content.

Created by : Ashish Shah, J.M. PATEL COLLEGE <Directory “/var/www/html/tests”> Options Indexes FollowSymLinks Includes AllowOverride None Order allow,deny Allow from all </Directory>

Created by : Ashish Shah, J.M. PATEL COLLEGE The Options Includes directive instructs Apache to parse files it serves from this directory for SSI directives. Next, create the Web page shown in Listing, naming it ssitest.shtml and placing it in /var/www/html/tests:

An SSI test page. ssitest.shtml file : Created by : Ashish Shah, J.M. PATEL COLLEGE An SSI test page. ssitest.shtml file :

Viewing ssitest.html in Firefox. Created by : Ashish Shah, J.M. PATEL COLLEGE Viewing ssitest.html in Firefox.