You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Charan <ch...@gmail.com> on 2009/12/05 19:35:17 UTC

[users@httpd] Using Virtual hosts for all the websites in one instance of Apache

Hi,

we have hundreds of websites and each website has multiple sub
domains. All the sites are running under sun web server 7.0
For example, www.hosting.com is the main domain, it also has sub
domain as www.hasting.com. www.hasting.com will be redirected back to
www.hosting.com. sometimes, if the domain name is
www.hostingforyou.com then it is redirected to a deep link of
www.hosting.com like www.hosting.com/docs/newdomain.html or else some
external link. All these redirections should be 301 and also non wwww
to www. These domain names have been setup at the DNS level.

Instead of adding virtual host for hasting.com in sun web server. Our
company wants to add all these subdomains of all websites in one
instance of apache web server. Is it possible to do?

-
Thanks,
Charan

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Using Virtual hosts for all the websites in one instance of Apache

Posted by André Warnier <aw...@ice-sa.com>.
Charan wrote:
> Hi,
> 
> we have hundreds of websites and each website has multiple sub
> domains. All the sites are running under sun web server 7.0
> For example, www.hosting.com is the main domain, it also has sub
> domain as www.hasting.com. www.hasting.com will be redirected back to
> www.hosting.com. sometimes, if the domain name is
> www.hostingforyou.com then it is redirected to a deep link of
> www.hosting.com like www.hosting.com/docs/newdomain.html or else some
> external link. All these redirections should be 301 and also non wwww
> to www. These domain names have been setup at the DNS level.
> 
> Instead of adding virtual host for hasting.com in sun web server. Our
> company wants to add all these subdomains of all websites in one
> instance of apache web server. Is it possible to do?
> 
> -
Probably, but it would help if you stopped using words like "subdomain" 
in a context that does not seem to make sense.
In no way is for example www.hasting.com a subdomain of www.hosting.com, 
and talking of subdomains of a website makes no sense at all.
You may want to have a look at the on-line Apache documentation, and 
particularly at directives such as ServerName and ServerAlias, and at 
the virtual host documentation at http://httpd.apache.org/docs/2.2/vhosts/
and also maybe at mod_rewrite : 
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org