Presentation is loading. Please wait.

Presentation is loading. Please wait.

APACHE SERVER By Innovationframes.com »

Similar presentations


Presentation on theme: "APACHE SERVER By Innovationframes.com »"— Presentation transcript:

1 APACHE SERVER By Innovationframes.com » chandranjoy@gmail.com

2 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

3 Important directories and configuration files Apache Web Server

4 Service profile Packages - httpd Configurations file - /etc/httpd/conf/httpd.conf Daemons - httpd Portnumber - 80

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

6 httpd package is installed using rpm command. Now query the package it show package is installed.

7 Open the httpd configuration file. Web server configuration

8 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

9 This screen show end of httpd.conf file. Web server configuration Copy the last seven lines.

10 Paste the copied lines here. Web server configuration

11 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.

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

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

14 Let us create html file. Web server configuration After typing save and quit the file.

15 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

16 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.

17 Create.htaccess file in /var/www/html/ directory and open the file. Web server configuration

18 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.

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

20 httpd password is stored in htpasswd file. Web server configuration

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

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

23 Restart the httpd service. Web server configuration

24 Enter the fully qualified domain name in address bar.

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

26 Enter the username and the password.

27 Web server configuration Now you can see the web page.

28 Access Control The web access can be controlled by using access control directives such as allow and deny. DirectiveDescription 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.

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

30 To access the web page only from the above specified network. Web server configuration

31 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

32 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.

33 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.

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

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

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

37 Httpd service is restarted. Name-based virtual hosts

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

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

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

41 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

42 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

43 Query is made to check whether the mod_ssl package is installed. if not, install the packages Apache Encrypted Web Server

44 To generate the certificate signature request. Apache Encrypted Web Server

45 The self signed certificate can be installed using the command make testcert. Apache Encrypted Web Server

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

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

48 Click here to view the certificate. Apache Encrypted Web Server

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

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

51 You can see a warning message indicating that this page can not be read by a third party. Apache Encrypted Web Server


Download ppt "APACHE SERVER By Innovationframes.com »"

Similar presentations


Ads by Google