how to configure apache server in linux

12
AIM: To study and implement the configuration of APACHE web browser. STEPS:- 1. Start Fedora 10 2. Open Terminal and begin the following procedure. Login as ROOT 3. Enter into html directory by typing cd /var/www/html which is the Home Directory of Apache server. 4. Simultaneously, you can open another terminal for this purpose. Login as ROOT. Enter into httpd/conf directory by typing cd /etc/httpd/conf

Upload: pranav-makkar

Post on 28-Mar-2016

261 views

Category:

Documents


2 download

DESCRIPTION

Easiest way to configure Apache server and providing some more information regarding apache server !

TRANSCRIPT

Page 1: How to configure Apache Server in linux

AIM: To study and implement the configuration of APACHE web browser.

STEPS:-

1. Start Fedora 10

2. Open Terminal and begin the following procedure. Login as ROOT

3. Enter into html directory by typing cd /var/www/html which is the Home

Directory of Apache server.

4. Simultaneously, you can open another terminal for this purpose. Login as

ROOT. Enter into httpd/conf directory by typing cd /etc/httpd/conf

Page 2: How to configure Apache Server in linux

5. Now, Open vi httpd.conf file and check out the following details like:

a. DocumentRoot : This shows the root/home directory of apache server

documents. (var/www/html)

Page 3: How to configure Apache Server in linux

b. DirectoryIndex: This shows the list of files that apache will serve if a

directory is requested. (index.html)

6. For checking the process Inside the RAM , type ps –el |grep httpd

Type /etc/init.d/httpd start for starting all the HTTPD process in RAM.

Page 4: How to configure Apache Server in linux

7. And again by typing ps –el |grep httpd, we can see some number of

processes. In our case, we see 9 lines. We can see in the below figure, we

are having 8 child process and 1 parent process. In this m we can change

the number of server processes to start. For example, StartServers 23

Means there will be 24 processes including 23 child process and 1 parent

process.

Page 5: How to configure Apache Server in linux
Page 6: How to configure Apache Server in linux

8. Now, Make another directory in /var/www/html and name it as google.

Create a HTML file , add any message in it and name it as index.html

Page 7: How to configure Apache Server in linux

9. Again Make another directory in /var/www/html and name it as yahoo.

Create a HTML file , add any message in it and name it as index.html

Page 8: How to configure Apache Server in linux

10. In other terminal, open httpd.conf file and edit the file shown in below

figure. In <VirtualHost> tag, make the following changes.

11. For copying lines, we can press number of lines to copy and press ‘yy’ and

for pasting lines, we can simply press ‘p’. This copying and pasting of lines

can be done only in ESC mode.

Page 9: How to configure Apache Server in linux

12. Type vi /etc/hosts for uses a resolver library to obtain the IP address

corresponding to a host name. And also to enter the server name of your

website such as google.com or yahoo.com

Page 10: How to configure Apache Server in linux

13. After the Editing , save the changes made by restarting the httpd server

using command /etc/init.d/httpd restart

14. Run your website, by typing elinks google.com or elinks yahoo.com

Page 11: How to configure Apache Server in linux
Page 12: How to configure Apache Server in linux