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

Support for webhosts that use CentOS
Post Reply
Grigorijs
Posts: 3
Joined: 2008/11/26 17:00:56
Location: Latvia

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

Post by Grigorijs » 2008/11/26 17:49:23

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)

NedSlider
Forum Moderator
Posts: 2894
Joined: 2005/10/28 13:11:50
Location: UK

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

Post by NedSlider » 2008/11/26 18:38:34

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

Grigorijs
Posts: 3
Joined: 2008/11/26 17:00:56
Location: Latvia

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

Post by Grigorijs » 2008/11/27 09:44:11

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!

Grigorijs
Posts: 3
Joined: 2008/11/26 17:00:56
Location: Latvia

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

Post by Grigorijs » 2008/11/27 20:46:09

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

NedSlider
Forum Moderator
Posts: 2894
Joined: 2005/10/28 13:11:50
Location: UK

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

Post by NedSlider » 2008/11/27 23:02:56

Great - glad you got it sorted :-)

Post Reply

Return to “CentOS 5 - Webhosting Support”