Domain name wildcard in directives

hello -

i forgot that when i migrate to a new server, i have to manually add the following line into httpd.conf for one particular website:

## manually added by mark 2021-01-30
ServerAlias *

is there some way i should be doing this within Virtualmin instead?


If you want to add to every new virtual server that you create these directives
## manually added by mark 2021-01-30
ServerAlias *

Virtualmin -> System Settings -> Server Templates - Select Default Settings (or as appropriate) and then in the drop down box “Website for Domain”. For Apache (but not Nginx) you will see a box Directives and settings for new websites; add the directives there.

To add directives to just one virtual server:
Virtualmin -> Services -> Configure SSL Website: Edit Directives
Virtualmin -> Services -> Configure Website: Edit Directives

@edwardsmarkf @calport,

The Virtualmin way of adding a “wildcard” to a domain can be found under:

“Server Configuration” > “Website Options” > “Website matches all sub-domains?”

Best Regards,
Peter Knowles | TPN Solutions

1 Like

This is much neater than the other method.

Kudos @tpnsolutions

i wish had seen this a couple of days ago… thank you so much tpnsolutions.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.