LinuxQuestions.org
Review your favorite Linux distribution.
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 09-25-2003, 07:16 PM   #1
Robin01
Member
 
Registered: Aug 2003
Posts: 104

Rep: Reputation: 15
internal virtual hosting


hello everybody..

i have the following configuration to setup an internal webpage but nothing seem to appear when i type in test1 or comgen.
i dont have a actuall domain name..
-----
[root@localhost bin]# apachectl stop
[root@localhost bin]# apachectl start
[root@localhost bin]# apachectl configtest
Syntax OK
------


NameVirtualHost *

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
<VirtualHost *>
ServerName comgen
ServerAdmin
DocumentRoot /var/www/html/comgen
ServerAlias test1
</VirtualHost>
any ideas why..
 
Old 09-25-2003, 08:47 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
In order for another machine or computer on the network to know where or how to find "test1" , you need to have your DNS or hosts file specify the hostname associated with its IP, etc.
 
Old 09-26-2003, 02:50 AM   #3
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Trickykid says:
In order for another machine or computer on the network to know where or how to find "test1" , you need to have your DNS or hosts file specify the hostname associated with its IP, etc.
---

Yes for the first hostname (actual servername) You can build a virtual host, which is "Name Based" or "IP based virtual host"

In the case of IP based virtual hosts: The server must have a different IP address for each IP-based virtual host.

In the case of name-based virtual hosts: With name-based virtual hosting, the server relies on the client to report the hostname as part of the HTTP headers. Using this technique, many different hosts can share the same IP address.

Name-based virtual hosting is usually simpler, since you need only configure your DNS server to map each hostname to the correct IP address and then configure the Apache HTTP Server to recognize the different hostnames. Name-based virtual hosting also eases the demand for scarce IP addresses. Therefore you should use name-based virtual hosting unless there is a specific reason to choose IP-based virtual hosting.

Hope this helps,
 
  


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 Hosting? nr5 Linux - Software 10 06-03-2005 01:30 PM
virtual hosting setenv02 Linux - General 6 05-05-2005 02:35 AM
Virtual hosting... id10t Linux - Networking 4 02-02-2004 05:43 PM
Virtual Hosting - what does it actually do? gevers1 Linux - General 3 02-01-2004 09:28 AM
Web Hosting on RH9 via ADSL from internal network?? shearder Linux - Networking 1 10-20-2003 01:19 PM


All times are GMT -5. The time now is 10:16 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