Linux Operations and Administration

Slides:



Advertisements
Similar presentations
4.01 How Web Pages Work.
Advertisements

Chapter Apache Installation on Linux. Acknowledgement The contribution made by Darrin Morison is acknowledged.
Project 1 Introduction to HTML.
1 Chapter 12 Working With Access 2000 on the Internet.
Layer 7- Application Layer
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.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
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.
Topics in this presentation: The Web and how it works Difference between Web pages and web sites Web browsers and Web servers HTML purpose and structure.
1st Project Introduction to HTML.
1 Chapter Overview Introduction to Windows XP Professional Printing Setting Up Network Printers Connecting to Network Printers Configuring Network Printers.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
APACHE SERVER By Innovationframes.com »
HTML 1 Introduction to HTML. 2 Objectives Describe the Internet and its associated key terms Describe the World Wide Web and its associated key terms.
Chapter ONE Introduction to HTML.
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Web Server Configuration Alokes Chattopadhyay Computer & Informatics Centre IIT Kharagpur.
The Linux Operating System Lecture 5: Apache Tonga Institute of Higher Education.
Linux Operations and Administration
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.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
DATA COMMUNICATION DONE BY: ALVIN SAMPATH CARLVIN SAMPATH.
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.
Introducing Dreamweaver MX 2004
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
Setting up NIS and HTTP. Network Information Service Reading: 1. Linux NIS HOWTO: howto/HOWTOhttp://
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
Apache + Tomcat. Apache + Tomcat Download mod_webapp.so:
1 Session 1: Introduction to HTML Spring Today’s Agenda Cover useful terminology for today’s session HTML, browsers, servers, etc. HTML Tags Get.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
SUSE Linux Enterprise Desktop Administration Chapter 12 Administer Printing.
HTML, XHTML, and CSS Sixth Edition Chapter 1 Introduction to HTML, XHTML, and CSS.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Course ILT Internet/intranet support Unit objectives Use the Internet Information Services snap-in to manage IIS, Web sites, virtual directories, and WebDAV.
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
MCTS Guide to Microsoft Windows Server 2008 Applications Infrastructure Configuration (Exam # ) Chapter Four Windows Server 2008 Remote Desktop Services,
1 Welcome to CSC 301 Web Programming Charles Frank.
MCTS Guide to Microsoft Windows Server 2008 Applications Infrastructure Configuration (Exam # ) Chapter Five Windows Server 2008 Remote Desktop Services,
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 1 Key Concepts 1.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
1 Session 1: Introduction to PHP & MySQL iNET Academy Open Source Web Development.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Linux Operations and Administration
HTML Concepts and Techniques Fifth Edition Chapter 1 Introduction to HTML.
Linux Operations and Administration
Web Server Administration Chapter 6 Configuring a Web Server.
CITA 310 Section 5 Virtual Hosts and Virtual Directories (Selected Topics from Textbook Chapter 6)
Presented by Lonnye Bower Fardin Khan Chris Orona APACHE WEB SERVER.
Chapter 1 Introduction to HTML, XHTML, and CSS HTML5 & CSS 7 th Edition.
Linux Operations and Administration Chapter Twelve Configuring a Mail Server.
The Internet, Fourth Edition-- Illustrated 1 The Internet – Illustrated Introductory, Fourth Edition Unit B Understanding Browser Basics.
Web Server Administration Chapter 6 Configuring a Web Server.
Chapter 7: Using Network Clients The Complete Guide To Linux System Administration.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
4.01 How Web Pages Work.
4.01 How Web Pages Work.
CISC103 Web Development Basics: Web site:
Chapter 1 Introduction to HTML.
E-commerce | WWW World Wide Web - Concepts
Project 1 Introduction to HTML.
E-commerce | WWW World Wide Web - Concepts
APACHE WEB SERVER.
4.01 How Web Pages Work.
Presentation transcript:

Linux Operations and Administration Chapter Ten Apache Web Server

Objectives Install Apache Web Server along with additional Apache modules Configure an Apache Web server with a GUI utility and by modifying Apache configuration files Create a Web page by writing an HTML script

Installing Apache Web Server A network computer with the primary role of serving Web pages to clients on request Can also host a Web site along with images, style sheets, and other content Clients (Web browsers) can access the Web pages Receives data from clients

Installing Apache Web Server (cont’d.) Open-source Free Developed by Apache Software Foundation (ASF) Designed to run on a wide variety of operating systems

Installing Apache Web Server (cont’d.) Apache version 2.2 Included with openSUSE Not installed by default Configured to run “out of the box” with no further modifications needed

Installing Apache Web Server (cont’d.) Apache software is mostly modular PHP module A poplar module PHP A server-side scripting language Commonly used to create dynamic Web pages

Installing Apache Web Server (cont’d.) Options to install Apache Web Server yast command YaST Software Management module Activity 10-1: Installing Apache Web Server Install Apache Web Server and other Web-related packages

Starting and Stopping Apache To start apache2 service using YaST: Open YaST Select System Services (Runlevel) Search for apache2 and enable the service

Starting and Stopping Apache (cont’d.) To start apache2 service at the command line: rcapache2 command Can be used only by the root user Is a link to a startup script in /etc/init.d directory Used to start, stop, and restart apache2 service Table 10-1 Describes common options used with rcapache2 command

Starting and Stopping Apache (cont’d.) Table 10-1 Common options used with rcapache2

Starting and Stopping Apache (cont’d.) To test an Apache Web server: Start Firefox Enter http://localhost in address bar Activity 10-2: Starting and Testing an ApacheWeb Server Check the status of an Apache Web server, stop and start the apache2 service, and test an ApacheWeb server at the command line and with a GUI tool

Starting and Stopping Apache (cont’d.) Figure 10-1 The Apache test page © Cengage Learning 2013

Configuring Apache Web Server Methods to configure Apache Web server Use the graphical YaST module (yast2-http-server) Advantages: convenient and easy to use Modify Apache configuration files httpd.conf Main configuration file Contains directives (instructions that tell Apache how to run) Advantage: can make more detailed changes

Apache Configuration with HTTP-Server A YaST module for configuring Apache Package name: yast2-http-server Can be installed from YaST Software Management To begin the Apache configuration process in HTTP-Server: Use yast2 http-server command

Apache Configuration with HTTP-Server (cont’d.) Figure 10-2 The HTTP Server Wizard © Cengage Learning 2013

Apache Configuration with HTTP-Server (cont’d.) HTTP Server Wizard Five steps Can choose network interface and ports that Apache listens on Port An interface for connecting a hardware device, such as a disk drive or printer In networking, it’s a data connection established for communication between hosts Port number identifies the type of function assigned to it

Apache Configuration with HTTP-Server (cont’d.) HTTP Server Wizard allows you to enable scripting languages Such as PHP and Perl Web server’s default host First declared virtual host in the configuration file Virtual host Makes it possible to run multiple domains on one physical machine You can add virtual hosts as needed with HTTP Server Wizard

Apache Configuration with HTTP-Server (cont’d.) Figure 10-3 Configuring the default host © Cengage Learning 2013

Apache Configuration with HTTP-Server (cont’d.) You can set the following for a Web server in Apache: DocumentRoot Alias ScriptAlias Include Server Name Server Administrator E-Mail

Apache Configuration with HTTP-Server (cont’d.) Activity 10-3: Using the HTTP Server Wizard Configure an Apache Web server with the HTTP Server Wizard Expert mode Enables you to adjust more settings than in the wizard

Apache Configuration with HTTP-Server (cont’d.) Figure 10-4 Expert mode in the HTTP Server Wizard © Cengage Learning 2013

Manual Apache Configuration Can configure an Apache Web server manually Edit configuration files in /etc/apache2/ directory Table 10-2 Describes common configuration files stored in this directory Apache configuration files follow the syntax: One directive per line # symbols indicate comments

Manual Apache Configuration (cont’d.) Table 10-2 Apache configuration files

Manual Apache Configuration (cont’d.) apache2ctl -t command Verifies that configuration files have no syntax errors Activity 10-4: Using Apache Configuration Files Explore common Apache configuration files

Manual Apache Configuration (cont’d.) Figure 10-5 Contents of an Apache configuration file © Cengage Learning 2013

Virtual Hosts Virtual hosts can be used to support multiple Web sites on one physical server By default, Apache is configured with a default host and no virtual host Apache supports: Name-based virtual hosts Multiple Web sites share the same IP address IP-based virtual hosts Multiple IP addresses for a single machine

Name-Based Virtual Hosts Ways to create name-based virtual hosts: Editing httpd.conf file Virtual host configuration files NameVirtualHost directive Specifies the IP address to use for name-based virtual hosts

Name-Based Virtual Hosts (cont’d.) An httpd.conf file that has been modified to support two virtual hosts:

Name-Based Virtual Hosts (cont’d.) ServerName directive Specifies name of the server Apache uses it to determine which virtual host is displayed All virtual hosts you create must have their server name resolved on the network

Name-Based Virtual Hosts (cont’d.) ServerAlias directive Can be used to define multiple names for a virtual host Order, Allow, and Deny directives Enable you to define which hosts can access files in a particular directory and which hosts can’t Order directive Tells Apache which filter (allow or deny) should be run first

Name-Based Virtual Hosts (cont’d.) Another way to create virtual hosts is to create a virtual host configuration file in /etc/apache2/vhosts.d directory Virtual host template (vhost.template) You can copy it and rename A virtual host configuration file must have a .conf extension

Name-Based Virtual Hosts (cont’d.) ServerAdmin directive Lists the Apache administrator’s e-mail account The only directives you must change: ServerName directive DocumentRoot directive Defines the directory path Apache uses to serve files for this host Directory directive Applies only to the named file system directory and subdirectories and their contents

Name-Based Virtual Hosts (cont’d.) After creating a virtual host configuration file, define NameVirtualHost directive in /etc/apache2/listen.conf file Activity 10-5: Creating Virtual Hosts Use a template to create virtual Apache Web servers

Name-Based Virtual Hosts (cont’d.) Figure 10-7 Defining the NameVirtualHost directive in the listen.conf file © Cengage Learning 2013

Creating a Web Page DocumentRoot directive Defines the directory Apache uses to serve Web pages to clients Uniform Resource Locator (URL) An address to a resource on the Internet index.html file Main Web page Default content in HTML markup: <html><body><h1>It works!</h1></body></html>

Creating a Web Page (cont’d.) Figure 10-8 A URL requesting a directory © Cengage Learning 2013

Creating a Web Page (cont’d.) Hypertext Markup Language (HTML) Hypertext Contains references or links to access other files or text Markup language Consists of instructions called tags that define how text is displayed

Creating a Web Page (cont’d.) Figure 10-9 Placing HTML tags on separate lines © Cengage Learning 2013

Creating a Web Page (cont’d.) Table 10-3 Common HTML tags

Creating a Web Page (cont’d.) To create a Web page in openSUSE Linux: You must use a text editor Activity 10-6: Creating Web Pages with HTML Create a basic HTML Web page

Summary Apache Web Server rcapache2 command can be used to: Web server software that can be downloaded free Available with the latest version of openSUSE rcapache2 command can be used to: Check status of Apache Web server Start, stop, and restart the server HTTP-Server is a YaST application module for configuring Apache Manual Apache configuration: modifying directives (instructions) in Apache configuration files

Summary (cont’d.) With virtual hosts in Apache Web Server, you can run multiple Web sites on one physical machine Apache Web Server supports two types of virtual hosts: Name-based virtual hosts IP-based virtual hosts A number of directives can be configured on an Apache Web server Includes the mandatory DocumentRoot, Directory, and ServerName