Solved

How I configure Apache Virtual to support all sub-domains

Posted on 2003-11-13
5
658 Views
Last Modified: 2010-03-04
I have some differences domains and sub domains
like this
abc.com
xyz.com
xxx.com

and sub domain
ftp.abc.com
www.abc.com
xxx.abc.com
...

all domains/sub-domain point to 1 IP address
I use mydomains.com as name server that can support "ANY ALL SUBDOMAIN" to 1 IP
For example
I can ping  a.bc.d.e.f.asdfa.sadfs.sdaf.fdsaf.ds.abc.com == my ip
but I not have to configure that subdomain

Now i can configure VirtualHost for all domain that I have, but
can not set for any all subdomain

QUESTION
1. Can apache support any all subdomain virtualhost?
2. If it can, how to configure that. if not why? where is document to refer
0
Comment
Question by:saknarak
  • 3
  • 2
5 Comments
 

Accepted Solution

by:
netter-bvg earned 125 total points
ID: 9739554
Put intohttpd.conf:

<VirtualHost  ip-address>
  ...
  ServerName abc.com
  ServerAlias   abc.com  *.abc.com
  ...
</VirtualHost>
0
 
LVL 2

Author Comment

by:saknarak
ID: 9741866
that ok, thank :D
0
 
LVL 2

Author Comment

by:saknarak
ID: 9741921
If I want to except some sub-domain for other DocumentRoot

I must rearrage VirtualHost tag??

example
<VirtualHost ip-address>
   ...
   ServerName xxx.abc.com
   ...
</VirtualHost>
<VirtualHost ip-address>
  ...
  ServerName abc.com
  ServerAlias *.abc.com
</VirtualHost>

is this example work??
0
 

Expert Comment

by:netter-bvg
ID: 9747380
I am not sure it works (not tested). I think each ServerAlias must be defined using regular expressions:

ServerName xxx.abc.com

ServerName abc.com
ServerAlias !(xxx).abc.com

(all is not tested)
0
 

Expert Comment

by:netter-bvg
ID: 9747477
Resource: httpd.apache.org/docs/ (v 1.3)
Usefull command:  apachectl configtest (tests config files)
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now