Wildcard configuration, with exceptions

Hell's Chicken

Verified User
Joined
Dec 14, 2006
Messages
7
Location
Gorinchem, The Netherlands
Hello,

I got a reguest for a website, with a wildcard configuration. He wants a few exceptions, so some subdomains forward to the originally made subdomain. I already tried to add some different ServerAliases, but with no result. Anyone got some tips for me?
 
Please note: this is based on a current system with Debian 5 32bit, with another OS/installation locations may be different.

If you're prepared to manually change /usr/local/directadmin/data/users/[username]/httpd.conf you could first put the configuration for the exceptions (like the config for sub.domain.tld). After the exceptions you could add the config for *.domain.tld. This works, however when certain changes within DirectAdmin are made it will "destroy" current configuration.

Solutions for this:
- Create a separate file with exceptions and include it in /etc/httpd/conf/httpd.conf with an Include ABOVE the line containing "# Do not change anything in included files, because they are rewritten by DirectAdmin #". So it won't be overwritten (as a special file is used for it).
- Just don't change certain DirectAdmin settings and inform your client that when they change it you manually have to change things and you could ask $$$ for it.
- Add the "special" subdomains as own accounts with a name before his main account in alphabetical order (and check that it is included before his main account in /etc/httpd/conf/extra/directadmin-vhosts.conf).
 
I got a reguest for a website, with a wildcard configuration.
I already have a website running, configured with a wildcard configuration. I did not get a request for a wildcard configuration. This is already working.

He wants a few exceptions, so some subdomains forward to the originally made subdomain. I already tried to add some different ServerAliases, but with no result. Anyone got some tips for me?

Is my question.

I already tried to mix some of extra ServerAliases, like my last try:

ServerName www.test.domain.com
ServerAlias www.test.domain.com test.domain.com
ServerAdmin [email protected]
DocumentRoot /home/domain/domains/domain.com/public_html/themes
ScriptAlias /cgi-bin/ /home/domain/domains/domain.com/public_html/themes/cgi-bin/

ServerAlias *.domain.com

I think the solution StreamService has given me can work. I'm going to try the solution tonight. If anyone has some more tips, I'd like to hear them.
 
Back
Top