Submitted by responsiveny on Thu, 04/25/2013 - 13:44
Hi I have a domain example.com on VM.
I want to add dozens of alias for this domain, web enabled only, like www1.example.com, www2.example.com ... www50.example.com
Rather than do this by the GUI, what syntax would I use in batch create servers to make all of these Apache-only alias (no mail, no dns needed).
Thank you
Status:
Active
Comments
Submitted by responsiveny on Thu, 04/25/2013 - 13:46 Comment #1
Can I just add a bunch of:
ServerAlias www27.example.com
to httpd.conf. If I did this, would I be missing any other settings that the GUI makes?
Would these appear in the GUI under the primary domain? (in the server selection dropdown)
Submitted by JamieCameron on Thu, 04/25/2013 - 18:59 Comment #2
Yes, you can add those ... although you will also need to add the corresponding DNS entries.
Alternately, you can use the Virtualmin command-line API. The shell command to add an alias domain is like :
virtualmin create-domain --domain www27.example.com --alias example.com --web
Submitted by responsiveny on Thu, 04/25/2013 - 20:51 Comment #3
great thanks