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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-25-2003, 08:02 AM
|
#1
|
LQ Newbie
Registered: Jul 2003
Posts: 5
Rep:
|
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!
|
|
|
07-25-2003, 08:06 AM
|
#2
|
Member
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362
Rep:
|
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.
|
|
|
07-25-2003, 08:15 AM
|
#3
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
yes, not a problem, just read through the virtualhost at apache.org
|
|
|
07-25-2003, 08:17 AM
|
#4
|
LQ Newbie
Registered: Jul 2003
Posts: 5
Original Poster
Rep:
|
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
|
|
|
07-25-2003, 08:18 AM
|
#5
|
Member
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362
Rep:
|
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.
|
|
|
07-25-2003, 08:25 AM
|
#6
|
LQ Newbie
Registered: Jul 2003
Posts: 5
Original Poster
Rep:
|
i see now Thank u Benz
bye!
|
|
|
07-25-2003, 08:34 AM
|
#7
|
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403
Rep:
|
The following thread contains useful information concerning Apache and Virtual Hosts.
http://www.linuxquestions.org/questi...threadid=74985
|
|
|
07-30-2003, 09:24 AM
|
#8
|
Member
Registered: May 2003
Location: philadelhpia pa
Posts: 92
Rep:
|
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......
|
|
|
08-06-2003, 07:41 AM
|
#9
|
Member
Registered: Mar 2003
Distribution: Fedora, Mac OSX
Posts: 362
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 01:02 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|