Linux - GeneralThis 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.
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.
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.
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'?
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......
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.