How to create catch-all subdomain in Plesk (linux)

April 24, 2008 – 10:10 by Tom Van den Berg

Create a subdomain for the domain you wish with the name like ‘zz-wildcard’ in Plesk. This domain have to be the last in the subdomains’ list ordered alpabetically, so we name it beginning from ‘zz’.

Add special configuration (catchall for all subdomains) to the vhost.conf file of this subdomain, for example /var/www/vhosts/domain.com/subdomains/zz-wildcard/conf/vhost.conf:

ServerAlias *.domain.com

Rebuild Apache configuration using websrvmng utility:

# $PRODUCT_ROOT_D/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=<domain>

Now, requests to all non existing subdomains have to go to zz-wildcard.domain.com.

http://kb.parallels.com/en/2239

Post a Comment