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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtual servers on an intranet

Status
Not open for further replies.

superjet

IS-IT--Management
Apr 12, 2002
78
US
OK.
I have set up an apache server to provide intranet pages.
I have the default page nailed, but I want to host two different intranet sites on the same box.
I am using Red Hat 8, Apache 2.2 and Webmin.
I have my internal DNS set up so when you type "test" in to the browser, it points to my server IP address(internal, of course)to /var/ I also have the DNS set up so when you type "test2" into the browser, it points to /var/ When I do this, I get the test page for both. If I remove the Virtual hosts, both requests bring up the correct web page /var/
I am close, but I am missing something, I think.

Thanks in advance for the help,
Jamie
 
If you use one vhost, you will have to use virtual hosting for ALL your sites because the "Main" server will no longer be served by apache. Make sure UseCanonicalNames is Off and NameVirtualHost * is uncommented. Be sure to have a ServerName sitex directive in each VirtualHoast. Create a directory for site1, site2 and so on in /var/ Inside each of those create sub-directories called html, cgi-bin and logs if each site will have its own logs. You probably won't do this with your setup. Use the "Main" server as an example. You don't need each and every Directory container in your vhosts because they are defineded globally. Just define a DocumentRoot and cgi-bin. Remember to restart apache every time you change httpd.conf. The command is "apachectl restart". Tip: Put all you vhosts at the bottom of httpd.conf so it's easy to find when you need to make changes. Create one and get it working the way you want. Then copy and paste as many as you need then edit them. Doing them one at a time makes it easier to track problems.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top