How to Set Up Wildcard Domains in DirectAdmin
Translated from Chinese by Claude. Read the original
This was something from a month ago. I installed WordPress on a DirectAdmin panel and turned on Multisite. Since DirectAdmin doesn’t support adding * subdomains, you have to edit the config file by hand, which is what this post is about. To set it up for a single domain, first log in over SSH (you need root) and enter the following commands, replacing yourdomain.com with your own domain
1 | cd /usr/local/directadmin/data/users/yourdomain/ |
Find ServerAlias www.yourdomain.com yourdomain.com
Add this after it: *.yourdomain.com
So it becomes ServerAlias www.yourdomain.com yourdomain.com *.yourdomain.com
Save, restart Apache, and your wildcard record takes effect. PS: I’ve noticed I’m getting used to writing posts in HTML…… the visual editor is garbage……