Workshop_HTTPD_BIND_Virtual host 06/24/2010


1. install apache server, name server bind and caching-nameserver for reference of name server configuration, also install httpd-manual to make sure the related reference can be found when not sure about the configuration of HTTPD

2.configure HTTPD first, change last several lines into

vim /etc/httpd/conf/httpd.conf 
    DocumentRoot /var/www/web1
    DocumentRoot /var/www/web2
                Options Indexes Includes
                AllowOverride AuthConfig

they are two hosts, and the web2 will use password authentication. now configure the web pages and make them into the right folder. and configure the authentications: goes to /etc/httpd/conf/ htpasswd -cm .htpasswd rocky then type in password

now vim /etc/www/web2/.htaccess
AuthName        "Rocky test web2"
AuthType        Basic
AuthUserFile    /etc/httpd/conf/.htpasswd
Require         valid-user

start the httpd server. Before install the named server, configure /etc/hosts and add and into hostnames to test httpd work properly.

Now configure named server
cp /etc/named.caching-nameserver.conf  /etc/named.conf
change named.conf  to allow  anyone to use it
 listen-on port 53 {;any; };
        allow-query     { localhost;any; };
and diable views, then create a new zone
type master;
file  "";
now edit the zone files
cp /var/named/ /var/named/
vim /var/named/
                IN NS           @
web1            IN A  
web2            IN A  
                     IN A  
                     IN AAAA         ::1
change the /etc/hosts and delete web1/web2 from host name.
now start named and ping to see if it is working
goes to client and vim /etc/resolv.conf

now open to see if its working



About Lei

I am an IT specialist with over 10 year experience - years on Automation, on-Premise or Azure.

I am happy to develop however never want be a full time developer. Only do what I have to do. If it has to be PowerShell,HTML, PHP, CSS, C#, VBS or JS, front end or backend, so be it, doesn't matter!

Spent years with Windows, SCCM, SharePoint, SQL and Exchange servers. For last several years, I have been actively working under On Premise > Azure environment.


Current Certificates:
    Microsoft® Certified-
  • -Enterprise Administrator
  • -Database Administrator
  • -SharePoint Administrator
  • -Administering and Deploying SCCM 2012
Red Hat Certified Technician
ITIL V3 Foundation - Practitioner

Working on Azure Certificates now and hopefully they can stop upgrading their questions one day! GIVE ME A BREAK!

Contact Lei

Name *
Email *
Comments *

Traffic since 10/08/2016

This week13
This month2086

Visitor Info

  • IP:
  • Browser: Unknown
  • Browser Version:
  • Operating System: Unknown

Who Is Online