Page 1 of 1

More than one web site on a single machine - cant setup...

Posted: 2008/11/26 17:49:23
by Grigorijs
Virtual Host running more than one web site (such as www.company1.com and www.company2.com) on a single machine.

I'm have CentOS 5 with server GUI, webmin.

What is simple way it should work by "default" setting in GUI, or anyway need make records in files.?

Required or not BIND servings or it is enough server GUI with some records, and apache?

Apache httpd.conf only respond for this combination:

This combination - ALL domain in browser load under host host company1.com

# Virtual host company1.com

DocumentRoot /var/www/html/company1/
ServerName company1.com
ServerAlias www.company1.com


# Virtual host company2.com

DocumentRoot /var/www/html/company2/
ServerName company2.com
ServerAlias www.company2.com

----------------------------------------------------------------
Second combination - ALL domain in browser load under host company2.com

# Virtual host company2.com

DocumentRoot /var/www/html/company2/
ServerName company2.com
ServerAlias www.company2.com


# Virtual host company1.com

DocumentRoot /var/www/html/company1/
ServerName company1.com
ServerAlias www.company1.com



Maybe this problem cos`:
Server setting up in local network IP behind router Edimax (setting as redirect to virtual server port 80 local machine)

More than one web site on a single machine - cant setup...

Posted: 2008/11/26 18:38:34
by NedSlider
Did you try searching the forum?

Take a look at this thread:

http://www.centos.org/modules/newbb/viewtopic.php?topic_id=16011&forum=41&post_id=56642

Re: More than one web site on a single machine - cant setup...

Posted: 2008/11/27 09:44:11
by Grigorijs
thanks, I'm was saw those thread before, but not successfully for me...

Maybe need to connect server to real open IP, without static IP inside LAN (router Edimax) ???


Thanks anyway!

Re: More than one web site on a single machine - cant setup...

Posted: 2008/11/27 20:46:09
by Grigorijs
Sorted myself!

This can work with normal router...

Only need put loclal NAT IP in:

NameVirtualHost 192.168.0.20



Previously I'm get used put real DNS IP both domens....

Thanks!
:-D

Re: More than one web site on a single machine - cant setup...

Posted: 2008/11/27 23:02:56
by NedSlider
Great - glad you got it sorted :-)