?
Solved

How I configure Apache Virtual to support all sub-domains

Posted on 2003-11-13
5
Medium Priority
?
667 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Accepted Solution

by:
netter-bvg earned 375 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

800 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