LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-25-2003, 08:02 AM   #1
Samspeed
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Rep: Reputation: 0
Virtual host and apache


hi there

i would like to host several websites on the same server (with only one ip) is it possible with the virtual host?How can I do that?

thx!
 
Old 07-25-2003, 08:06 AM   #2
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
Read the Vitual Hosts Section (#3) in httpd.conf. It's pretty self-explanitory. Basically you will define a hostname and associate it with a certain directory on the machine, which becomes the web root for that host. Wash Rinse and Repeat for each additional host and web root.
 
Old 07-25-2003, 08:15 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yes, not a problem, just read through the virtualhost at apache.org
 
Old 07-25-2003, 08:17 AM   #4
Samspeed
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Smile

Hello


thx for ur help...i have an other question : i suppose that i need a valid dns name(i only have an ip)... it will work without it?


thank u very much
 
Old 07-25-2003, 08:18 AM   #5
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
Short answer: No
Long answer: No way.

Apache has no way to descriminate two different hostnames for different sites on the same machine if you don't even have a valid hostname.

How would expect that a web client could reach one web site via address '123.213.123.1' and another web client reach a different page via address '123.213.123.1'?

Last edited by bentz; 07-25-2003 at 08:20 AM.
 
Old 07-25-2003, 08:25 AM   #6
Samspeed
LQ Newbie
 
Registered: Jul 2003
Posts: 5

Original Poster
Rep: Reputation: 0
i see now Thank u Benz

bye!
 
Old 07-25-2003, 08:34 AM   #7
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
The following thread contains useful information concerning Apache and Virtual Hosts.
http://www.linuxquestions.org/questi...threadid=74985
 
Old 07-30-2003, 09:24 AM   #8
lenlutz
Member
 
Registered: May 2003
Location: philadelhpia pa
Posts: 92

Rep: Reputation: 15
virtual host

Quote:
Originally posted by bentz
Short answer: No
Long answer: No way.

Apache has no way to descriminate two different hostnames for different sites on the same machine if you don't even have a valid hostname.

How would expect that a web client could reach one web site via address '123.213.123.1' and another web client reach a different page via address '123.213.123.1'?
How would expect that a web client could reach one web site via address '123.213.123.1' and another web client reach a different page via address '123.213.123.1'?

Just WHAT is the answer to this ????
i have dsl, and a fixed ip.....
i would like to add a second web site, to my machine....
i assume i CAN NOT use virtual ip, and need to use virtual name....
, but, the question above, has me a bit confused......
 
Old 08-06-2003, 07:41 AM   #9
bentz
Member
 
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362

Rep: Reputation: 30
The answer is that you can't expect a server to server you two different pages when it is being referred to by a single name, such as an IP.

It's like saying that your company's website, http://123.213.123.1/ should show the 'Products' page, while http://123.213.123.1/ should show the 'Support' page. It is not going to work.

As far as your question goes, you NEED DNS to do virtual hosting. I don't know what you mean by 'virtual name' unless you mean a second DNS hostname for your second virtual web server.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache - Name virtual host tisource Linux - Networking 5 03-03-2006 02:52 AM
Apache 2.0 Virtual Host? w0lfeyes Linux - Networking 1 05-03-2004 03:09 PM
apache and virtual host diverge Linux - Networking 2 01-11-2004 02:45 AM
apache virtual host navinc Linux - Software 10 05-22-2003 12:16 PM
apache virtual host mimi Linux - General 1 04-06-2002 05:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:02 AM.

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
Open Source Consulting | Domain Registration