Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I currently have Apache2 configured to host wildcarded subdomains of the form *.domains.tld, where the * is unique for each client we have.

Each client has an 'admin' page that they can log into, currently at client.domain.tld/admin, that we would like to move to serve from admin.client.domain.tld.

Is it possible to serve a sub-domain to a wildcarded sub-domain? I can't seem to find anything related to this.

Thanks!

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

You can do this with ServerAlias, as it supports wildcards.

<VirtualHost *:80>
    ServerName admin.YourStaticDomain.com
    ServerAlias admin.*
    DocumentRoot /path/to/adminsite
    UseCanonicalName Off
</VirtualHost>

This is assuming that they all share the same admin code base, and site-specific options are generated based on their login credentials.

share|improve this answer
    
Correct, thanks! –  Paul Mennega Jan 10 '13 at 22:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.