tags:

views:

13

answers:

2

I'm using a wildcard subdomain to manage most of my requests but I'm running into an issue of getting one of my subdomains (let's say, wiki.domain.com) to load first.

I understand that loading this inside an httpd.conf or something would just be a case of resorting which VirtualHosts load first, but I am using a2ensite and sites-available to manage my domains (individual files for each domain), which, to my knowledge, means I have no real way of determining which domains are "loaded" first.

I am running Ubuntu Hardy.

+2  A: 

I believe the order of loading is from the name of the configuration file in the /etc/apahce2/sites-enabled directory. so if you wanted one loaded first, you would name the file 000-wiki.domain.com (or a2ensite 000-wiki.domain.com)

Out of curiosity, why does the order matter for you?

Rob Di Marco
I'm not entirely sure, honestly. I'm just going about trying to figure out why the wildcard subdomain is shadowing the static subdomain and this just seemed like a logical conclusion.Also, your suggestion solved this issue! Thanks!(p.s. I'd vote you up but I don't have 15 rep yet :/ me = newbie)
jeek
A: 

(Because this question is related to system administration, it's better suited for serverfault.com.)

Under Debian and Ubuntu's default configuration, sites are loaded in alphabetical order (using Apache's Include directive), so you can change the order in which your sites load by changing their names. (For example, the default site that Debian provides is actually named 000-default, to make it very likely that it will load first.)

Josh Kelley