LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-11-2005, 07:28 AM   #1
jkmartha
Member
 
Registered: Apr 2005
Location: india
Distribution: Redhat 9
Posts: 66

Rep: Reputation: 15
virtual host on httpd


I have one public IP address. i want to configure "name based virtual hosts". i want to host 10 websites on a single IP. What are the configuration changes to be made to "httpd conf " file & DNS zone files ? pliz help . thanx.
 
Old 04-11-2005, 08:02 AM   #2
ravee
Member
 
Registered: Jan 2005
Location: India
Distribution: Fedora Core 2
Posts: 83

Rep: Reputation: 15
Since you have only one public address, named based virtual hosting is the way to go.

for that open /etc/httpd/conf/httpd.conf (apache configuration file) in your favourate editor and edit the following lines...

NamedVirtualHost 211.118.126.11:80

# where 211.118.126.11 is your public IP address

<VirtualHost 211.118.126.11:80>
...
...
ServerAlias www.xyz.com
...
</VirtualHost>

<VirtualHost 211.118.126.11:80>
...
...
ServerAlias www.abc.com
...
</VirtualHost>


You can give any number of virtual host directives. The ServerAlias points to the site you want to host. That way you can host multiple sites.

Frankly speaking, there is much much more to apache configuration than what I have writen. It is advisable to really read the excellent manual that comes with the distro.
 
Old 04-11-2005, 08:25 AM   #3
jkmartha
Member
 
Registered: Apr 2005
Location: india
Distribution: Redhat 9
Posts: 66

Original Poster
Rep: Reputation: 15
Thanx Ravee....For the first time, i got an useful reply on this forum. But will there have to be any changes to the DNS zone files for name based virtual host to take effect ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual servers on internal network (httpd/named) E-Rick Linux - Newbie 4 10-17-2004 08:53 AM
httpd virtual hosts TKS Slackware 1 07-02-2004 11:31 PM
HTTPD:NameVirtual Host nbjayme Fedora 5 01-25-2004 11:00 PM
virtual host ziggie216 Linux - General 2 12-22-2003 07:38 PM
VIrtual host thep Linux - General 10 08-06-2002 12:28 PM


All times are GMT -5. The time now is 12:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration