Webserver1

  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Webserver1 as PDF for free.

More details

  • Words: 792
  • Pages: 22
1

WEB Server for Linux/Unix

Tux Kernel based only text support, Very fast Stronghold from RedHat Linux Sun one Also known as iPlanet from Sun Microsystems AOL server American online free web server Apache Open source NETSCAPE

2

What is Apache ?

Apache is a freeware & is the Most Popular & widely used Web Server which consumes 60% of web market that can be configured in both windows and LINUX.

3

How HTTP Server works ?

DNS DNS Server Server server server

192.168.0.253 192.168.0.253

Web Web Server Server 192.168.0.254 192.168.0.254

Linux Linux Client Client 192.168.0.1 192.168.0.1

www.zoom.com www.zoom.com

Windows Windows Client Client client1 client1

192.168.0.2 192.168.0.2

client2 client2

ZOOM.COM ZOOM.COM

4

How Web Server works ? Forward zone

zoom.com

DNS DNS Server Server

server2

192.168.0.254

www

192.168.0.254

server

192.168.0.253

server server

192.168.0.253 192.168.0.253

Linux Linux Client Client 192.168.0.1 192.168.0.1

r fo m g ik n .co f o m so lo zoo es om . r m d .c I ww or ad om .254 w est f e s .zo 8.0 eb Requ .254 r He ww 2.16 W 92.168.0 w 9 1 1 from Reply .254 b e 0 W 68. 192.1

client1 client1

Web Web Server Server 192.168.0.254 192.168.0.254

www.zoom.com www.zoom.com

Windows Windows Client Client

192.168.0.2 192.168.0.2

client2 client2

ZOOM.COM ZOOM.COM

5

Requirements

Packages httpd-2.0.52-9.ent.i386.rpm httpd-devel-2.0.52-9.ent.i386.rpm httpd-manual-2.0.52-9.ent.i386.rpm httpd-suexec-2.0.52-9.ent.i386.rpm Port Numbers 80

Http

Configuration File /etc/httpd/conf/httpd.conf Service httpd Daemon httpd

6

HTTP Server Configuration

DNS DNS Server Server server server

192.168.0.253 192.168.0.253

Web Web Server Server 192.168.0.254 192.168.0.254

Linux Linux Client Client 192.168.0.1 192.168.0.1

www.zoom.com www.zoom.com

Windows Windows Client Client client1 client1

192.168.0.2 192.168.0.2

client2 client2

ZOOM.COM ZOOM.COM

7

Configuring DNS Server

Install Installthe thepackage packageby byusing usingone oneof ofthe theinstallation installationmethods methods [root@comp1~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ [root@comp1~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt /mnt [root@comp1 [root@comp1~]# ~]#cd cd /mnt /mnt [root@comp1 [root@comp1~]# ~]#rpm rpm -ivh -ivh bind* bind* caching* caching* --force --force --aid --aid

Open Openconfiguration configurationfor forediting editing [root@comp1~]# vi /etc/named.conf [root@comp1~]# vi /etc/named.conf

8

/etc/named.conf

To Tochange change the theoptions options zone "zoom.com" IN { zone "zoom.com" IN { type typemaster; master; file file zoom.for"; zoom.for"; }; };

9

Configuring Forward Lookup

Copying CopyingForward Forwardlookup lookupzone zonefile file [root@comp1 ~]# cd /var/named/chroot/var/named/ [root@comp1 ~]# cd /var/named/chroot/var/named/ [root@comp1 [root@comp1named]# named]# cp cp localhost.zone localhost.zone zoom.for zoom.for

Open Openconfiguration configurationfor for editing editing [root@comp1 named]# vi zoom.for [root@comp1 named]# vi zoom.for

10

/var/named/chroot/var/named/zoom.for

To Toadd addthe theoptions options $TTL $TTL 86400 86400 @ IN @ IN

SOA SOA

server.zoom.com. server.zoom.com.root.zoom.com.( root.zoom.com.( 42 ;;serial 42 serial(d. (d.adams) adams) 3H 3H 15M 15M

;;refresh refresh ;;retry retry

1W 1W 1D 1D))

;;expiry expiry ;;minimum minimum server.zoom.com. server.zoom.com.

server server server2 server2

IN IN IN IN IN IN

NS NS AA AA

www www

IN IN

CNAME CNAME server2 server2

192.168.0.253 192.168.0.253 192.168.0.254 192.168.0.254

11

Configuring DNS Server IP address

Open Openconfiguration configurationfor for editing editing [root@comp1 ~]# vi /etc/resolv.conf [root@comp1 ~]# vi /etc/resolv.conf

Add Addthe theDNS DNSserver serverIP IPaddress addressin infile file/etc/resolv.conf /etc/resolv.conf nameserver 192.168.0.253 nameserver 192.168.0.253

12

DNS Server

To Torestart restartthe theDNS DNSservices services [root@comp1 ~]# service named restart [root@comp1 ~]# service named restart

13

Checking from DNS Server

Checking CheckingForward ForwardLookup Lookup [root@comp1 ~]# dig www.zoom.com [root@comp1 ~]# dig www.zoom.com

Checking CheckingName Name resolution resolution [root@comp1 ~]# ping www.zoom.com [root@comp1 ~]# ping www.zoom.com

14

Configuring HTTP Server

Install Installthe thepackage packageby byusing usingone oneof ofthe theinstallation installationmethods methods [root@comp1 ~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ [root@comp1 ~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS//mnt /mnt [root@comp1 [root@comp1~]# ~]#cd cd /mnt /mnt [root@comp1 [root@comp1~]# ~]#rpm rpm -ivh -ivh httpd* httpd* --force --force --aid --aid

Open Openconfiguration configurationfor forediting editing [root@comp1~]# [root@comp1~]#vi vi etc/httpd/conf/httpd.conf etc/httpd/conf/httpd.conf

15

/etc/httpd/conf/httpd.conf

Change Changethe thebelow belowoptions options ServerAdmin [email protected] ServerAdmin [email protected] ServerName ServerName www.zoom.com:80 www.zoom.com:80 DocumentRoot DocumentRoot "/var/www/html" "/var/www/html" DirectoryIndex zoom.html DirectoryIndex zoom.html

16

HTTP Server

To Torestart restartthe theHTTP HTTP services services [root@comp1 ~]# service httpd restart [root@comp1 ~]# service httpd restart

17

Configuring DNS on Client

Open Openconfiguration configurationfor for editing editing [root@comp1 ~]# vi /etc/resolv.conf [root@comp1 ~]# vi /etc/resolv.conf

Add Addthe theDNS DNSserver serverIP IPaddress addressin infile file/etc/resolv.conf /etc/resolv.conf nameserver 192.168.0.253 nameserver 192.168.0.253

18

HTTP Client

Linux

Accessing AccessingWebserver Webserver Open Mozilla or Fire Fox browser. Open Mozilla or Fire Fox browser. In Inthe theaddress addressbox boxtype type http://www.zoom.com http://www.zoom.com or or http://192.168.0.254 http://192.168.0.254

19

HTTP Client

Windows

Accessing AccessingWebserver Webserver Open Internet Explorer or Netscape Open Internet Explorer or NetscapeNavigator Navigator browser. browser. In Inthe theaddress addressbox boxtype type http://www.zoom.com http://www.zoom.com or or http://192.168.0.254 http://192.168.0.254

20

21

/etc/httpd/conf/httpd.conf

Add Addthe thebelow belowlines linesfor forAuthentication Authentication AuthUserFile AuthUserFile /etc/httpd/conf/htpasswd /etc/httpd/conf/htpasswd AuthName AuthName "WebAuthentication" "WebAuthentication" AuthType Basic AuthType Basic Require Require valid-user valid-user

Creating Creatinguser userand andassigning assigningpassword password [root@comp1~]# [root@comp1~]#htpasswd htpasswd-c -c/etc/httpd/conf/htpasswd /etc/httpd/conf/htpasswd user1 user1 New password: **** New password: **** Re-type Re-typenew newpassword: password:****** ******

22

Related Documents

Webserver1
October 2019 4