ispCP - Board - Support
How to redirect nonexists domains? - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Howtos (/forum-41.html)
+--- Thread: How to redirect nonexists domains? (/thread-14843.html)



How to redirect nonexists domains? - max.samael - 07-24-2011 02:47 AM

I don't know if is this in good section, but my question:

How to redirect non exist subdomain *.sampledomain.tld to sampledomain.tld but not to hostingdomain.tld?

Is this setting for ispcp omega or something else?
Can somebody explain this setting?


RE: How to redirect nonexists domains? - freshwind - 07-24-2011 05:00 PM

Hi, Max

ISPCP seems not able to deal with such kind of wildcard DNS.
However you can edit those settings manually.

Step 1
Go to /etc/apache2/sites-enabled/ispcp.conf
Find the section for your domain, say "sampledomain.tld"
Change the line:
ServerAlias http://www.sampledomain.tld sampledomain.tld vu2002.hostingdomain.tld
to:
ServerAlias *.sampledomain.tld sampledomain.tld vu2002.hostingdomain.tld

Step 2
and what's more you have to change your DNS settings.
1)If you are using ispcp/bind, edit your domain's DNS records at /etc/ispcp/bind/working/sampledomain.tld.db
find line:
sampledomain.tld. IN A xxx.xxx.xxx.xxx
add one line underneath it:
*.sampledomain.tld. IN A xxx.xxx.xxx.xxx

2)If you are using a outside DNS server, just add a wildcard record to you server IP.

To prevent ISPCP updating those settings you also need to edit the records in the database. I'm not sure about this part, leave it to someone else.

Just offer an approach to solve your question, it is not realizable to do this for every client in a producing environment.