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


At work, I'll be migrating our server from a WAMP box to a LAMP box and with my knowledge of Apache and wildcard domains, we're hoping to use client.ourtestserver.com instead of our current test.ourtestserver.com/client/project_id

Of course, management wants the project_id in the URL for accounting, billing and organizational purposes, so they want to use project_id.client.ourtestserver.com or client.ourtestserver.com/project_id.

Problem is, the developers and project managers like the short name to develop with (client.ourtestserver.com), so there's a conflict.

My Question

Is there a way for Apache to automatically list a sub-domain's sub-sub-domains, such as client.ourtestserver.com listing (through a simple directory listing or of the like) sub-sub domains such as 1234.client.ourtestserver.com, 1235.client.ourtestserver.com, 3452.client.ourtestserver.com ??

That way we can point a client to client.ourtestserver.com (which is easier to say over the phone) and have them click on their project_id.

Or am I going about this the wrong way?

share|improve this question

1 Answer 1

Running httpd -S will list all VirtualHost and NameVirtualHosts for an apache configuration. However if you are using the wildcard feature, I believe the only authoritative source for this information is the DNS server for the "ourtestserver.com" zone. Of course, you can do analysis of the access logs, provided that you have %{Host}i in your LogFormat, but that will only provide sub-sub-domains that have been accessed before.

share|improve this answer

Your Answer


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.