Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do they do virtual hosting like that?

Status
Not open for further replies.

JCrou82

Programmer
Aug 23, 2002
265
US
Hello, I am slightly familiar with setting up apache and modifying the config file. This is my scenario. We have three or more domain names hosted on this machine. They are all hitting the correct directories where the web files are located.

heres what happens. If i type in or xx.xxx.xxx.xx (ip address) it goes to the main directory. but when i type in a different address which we host, it goes to that particular subdirectory, but on the address bar, it goes to where domainname is the name of the subdirectory. Now I know that you can do virtual hosts, but when I read the httpd.conf file, i saw nothing about virtual hosts nor anything mentioning this particular subdirectory. In other words, it seems as if it magically knows where to look for that domain.
My question is how is it set up, and wether it's an ISP set up or if apache has been configured to do that. What I would like to do, is eliminate and have the root folder for that domain name point to the particular subdirectory.

Thanks in advance if anyone can help me figure this out.
 
I think the later versions of apache use a file called ssl.conf for it's secure vhosts instead of in the regular httpd.conf. To my understanding, you can not mix secured and unsecured vhosts any more. I don't have SSL setup on my server so I am not the authority on this matter. :)
 
RA: I'm not an authority on this matter either but I found it too much of a trial to set up partial or directory-specific SSL with the latest version of Apache that came with RH 8.0

Vhost containers make life very easy for both you and Apache. Consider a rewrite of your httpd.conf to a more conventional vhost format.

There's also a way to do mass vhosting without having to define individual containers. I passed on this one due to problems with my Samba server, but I may revisit it in the near future since I think I've got the bugs worked out of it. The mass vhosting setup allows you to simple add directories to your server using the domain name, and Apache will pick up the loose change....
 
RythmAce: Your point is most likely correct. Because I can't have vhosts with ssl and vhosts without ssl the script that is being ran currently (though I agree should be thrown out) was created. So now if I go into a vhost setup, there is now way to host on this same server, a site that will require ssl.

Question - What truelly is SSL, besides Secure Socket Layer? In other words, what does it do and how (briefly)? Is there an alternative to it so that I could host regural sites and sites requiring Encryption all on the same server? Would I have to use a different webserver application/software/service?

wlwoman: You have definately gone beyond my understanding. Thank you for increasing my awareness. If you could please clarify a few things in your post for me to understand.

"I found it too much of a trial to set up partial or directory-specific SSL with the latest version of Apache that came with RH 8.0" --- Is this to say that the latest version of Apache on RH 8.0 will allow me (with some hassle) to run SSL vhosts and non-SSL vhosts, or am I incorrect in this presumption?

"Vhost containers make life very easy for both you and Apache. Consider a rewrite of your httpd.conf to a more conventional vhost format." --- Eventhough I'm pretty sure I know what you mean by this statement, could please give me an example so i know i'm on the same page with you?

"The mass vhosting setup allows you to simple add directories to your server using the domain name, and Apache will pick up the loose change...." --- When you have found out more about this, will you post it here so that I can have a better understanding of what that means?


Thanks to all for posting, the information collected here has been useful.
 
There is a FAQ in this forum that explains how to setup mass virtual hosting.
FAQ65-1836 //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top