Docstoc

Apache server ppt

Document Sample
Apache server ppt Powered By Docstoc
					           APACHE SERVER
• By NETMAX TECHNOLOGIES




        » From AJIT PUNCHHI
        » REDHAT ENGINEER
           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
                  Apache Web Server
Important directories and configuration files
             Service profile


• Packages             -       httpd

• Configurations file -
  /etc/httpd/conf/httpd.conf

• Daemons                  -        httpd

• Portnumber       -           80
Web server configuration




         Query a httpd package whether
         installed or not but the screen
          shows httpd packages is not
                    installed.
Web server configuration




         Now query the package
             httpd package is
           it show using rpm
          installedpackage is
                 installed.
                command.
Web server configuration



          Open the httpd
         configuration file.
Web server configuration
                 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
               This screen show end of
                    httpd.conf file.



                  Copy the last seven
                        lines .
Web server configuration

               Paste the copied lines
                       here .
Web server configuration

              In virtual host field we enter
              Here specify the e-mail address
               ipaddress or fully qualified
                 Here specify the base directory
              of the administrator for the webfor
                   Here specify the hostname
                     domain html quit will be
                 from which address. the the
                     Now save and files
                            server.
                             your server.
                              saved..
                           httpd.conf file.
Web server configuration




       After editing the configuration
         file The service httpd is
                  restarted.
Web server configuration




      Creating index.html page and place
        this file in the /var/www/html/
                     directory.
Web server configuration




     After typing save and quit
                 Let us create html
               the file.
                         file .
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
                  Directives that can be overridden
                     to access our web site we can
                  by the entries in an .htaccess file.
                       add directory session inside
             Setting up /var/www/html/ access
                           virtualhost .
                      control directive session.
Web server configuration



             Create .htaccess file in
         /var/www/html/ directory and
                  open the file
                        .
Web server configuration
                  authorization realm is given to
             The Type of user authentication for
                 Selects the authenticated users
                 client so only Basic and Digest
             the directory.the user knows which
                   that can access a directory.
              username and password to send.
                    are currently implemented.

                  This file contain list of users and
                          passwords for user
                            authentication.
Web server configuration


                 Set the httpd password for
                        the user joe .
Web server configuration

                httpd password is stored
                    in htpasswd file.
Web server configuration




          Set full permission for the
        htpasswd file to make sure that
           the user has the execute
                  permission .
Web server configuration



          To add another user in the
               htpasswd file.
Web server configuration




        Restart the httpd service.
Web server configuration




          Enter the fully qualified domain
                name in address bar.
Web server configuration




         When we access the web page
        the mozilla will prompts for the
            username and password.
Web server configuration




         Enter the username and the
                  password.
Web server configuration




        Now you can see the web page.
                Access Control
• The web access can be controlled by using
  access control directives such as allow and
  deny.
   Directive     Description

• deny from host Determines hosts that can access a
   host ….           given directory: all, or partial or full
                     domain name or ip address.

   allow from host   Determines which hosts can access a
   host ….           given directory: all, or partial or full
                     domain name or ip address.
Web server configuration




    This indicates that we can access
    the web page from any network.
Web server configuration




        To access the web page only from
          the above specified network.
             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
Name-based virtual hosts


                  Here we place two domains
                   Two domains are used in the
                 in a single ip address and we
                       name of example and
                 can place number of domains
                       test.com in a single ip
                    using single IP address.
                       address 192.168.0.20.
Name-based virtual hosts




              An ip address is
              mentioned in the
              virtualhost field.
Name-based virtual hosts




                  The server fully
                 qualified domain
                 name is described
                       here.
Name-based virtual hosts




            A Directory is created in the
            specified path as above here
              copy test.com webpage..
Name-based virtual hosts




          Httpd service is restarted.
Name-based virtual hosts




            This is the webpage for the
                      test.com .
Name-based virtual hosts




              This is the webpage for
                   example.com.
Apache Encrypted Web Server




          Now you can access the web
                page securely.
 Apache Encrypted Web Server

• Apache can provide encrypted
 communications using the mod_ssl apache
 module.



• To make use of encrypted communications,
 a client must request the https protocol.
 Apache Encrypted Web Server
• Package                -       mod_ssl

• Port number                -    443


• Certificate             -
  conf/ssl.crt/server.crt

• Private key             -
  conf/ssl.key/server.key
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
                 To generate the certificate
                     signature request.
Apache Encrypted Web Server
               The self signed certificate can be
                 installed using the command
                         make testcert.
Apache Encrypted Web Server



          When we restart the httpd service
          it will prompts for the password.
Apache Encrypted Web Server



              Open the mozilla browser and
             type fully qualified name in the
            address bar using https protocol.
Apache Encrypted Web Server


                   Click here to
                     view the
                    certificate.
Apache Encrypted Web Server

               Here you can view the certificate
                        informations.
Apache Encrypted Web Server


                After examining accept the certificate
                 temporarily or permanent and then
                              click ok.
Apache Encrypted Web Server




         You can see a warning message
         indicating that this page can not
             be read by a third party.