apache server by innovationframes.com » [email protected]
TRANSCRIPT
Apache Web Server• Apache web server:
• The Apache Web server is a free HTTP (Web) server developed by the Apache Server Project.
• It is a reliable, efficient , and easily extensible Web Server
• Free open source code
Service profile
• Packages - httpd
• Configurations file - /etc/httpd/conf/httpd.conf
• Daemons - httpd
• Portnumber - 80
Query a httpd package whether installed or not but the screen shows httpd packages is not
installed.
Web server configuration
Web server configuration
httpd package is installed using rpm
command.
Now query the package it show package is
installed.
You can see the first page file content, we need to edit the end part of the, so press shift+G in command mode the cursor will
bottom of page.
Web server configuration
In virtual host field we enter ipaddress or fully qualified
domain address.
Web server configuration
Here specify the e-mail address of the administrator for the web
server.
Here specify the base directory from which html files will be
saved..
Here specify the hostname for your server.
Now save and quit the the httpd.conf file.
Creating index.html page and place this file in the /var/www/html/
directory.
Web server configuration
Open the mozilla web browser and type the fully qualified domain name in address bar and press
enter, it will open corresponding web page.
Web server configuration
To allow only a particular user to access our web site we can add directory session inside
virtualhost session.
Web server configuration
Setting up /var/www/html/ access control directive .
Directives that can be overridden by the entries in
an .htaccess file.
The authorization realm is given to the client so the user knows
which username and password to send.
Web server configuration
Type of user authentication for directory. only Basic and Digest
are currently implemented.
This file contain list of users and passwords for user
authentication.
Selects the authenticated users that can access a directory.
Set full permission for the htpasswd file to make sure that
the user has the execute permission .
Web server configuration
When we access the web page the mozilla will prompts for the
username and password.
Web server configuration
Access Control• The web access can be controlled by using
access control directives such as allow and deny.
•
Directive Description
deny from host host ….
Determines hosts that can access a given directory: all, or partial or full domain name or ip address.
allow from host host ….
Determines which hosts can access a given directory: all, or partial or full domain name or ip address.
Virtual host
• Virtual hosts allow you to host multiple domains from a single machine.
• Apache supports two different type of virtual hosts.
• • Name-based virtual hosts
• Ip-based virtual hosts •
Ip and Named-based Virtual Hosts
• IP-based virtual hosts• -Ip-based virtual hosts are used when
a single machine has several different IP address.
• -To run a virtual host on each IP address.
• Named-based virtual hosts
• -It allow you to host many virtual hosts from a single IP address.
Name-based virtual hosts
Here we place two domains in a single ip address and we can place number of domains
using single IP address.
Two domains are used in the name of example and test.com in a single ip address 192.168.0.20.
A Directory is created in the specified path as above here
copy test.com webpage..
Name-based virtual hosts
• Apache can provide encrypted
communications using the mod_ssl apache
module.
• To make use of encrypted communications,
a client must request the https protocol.
• Encryption is based on either the RSA or
DSA algorithm.
Apache Encrypted Web Server
• Package - mod_ssl
• Port number - 443
• Certificate - conf/ssl.crt/server.crt
• Private key - conf/ssl.key/server.key
• Self-signed cert - make testcert
• Certificate signature req - make certreq
Apache Encrypted Web Server
Query is made to check whether the mod_ssl
package is installed. if not, install the packages
Apache Encrypted Web Server
The self signed certificate can be installed using the command
make testcert.
Apache Encrypted Web Server
Open the mozilla browser and type fully qualified name in the address bar using https protocol.
Apache Encrypted Web Server
After examining accept the certificate temporarily or permanent
and then click ok.
Apache Encrypted Web Server