0

With the code below I only allow people to visit my website by one domain. I need multidomain support like example.com and example2.com. How to do this?

   ServerName example.com
   ServerAdmin [email protected]
   UseCanonicalName Off
   <If "tolower(%{SERVER_NAME}) != 'example.com'">
      AllowOverride None
      Require all denied
   </If>
</VirtualHost>

1 Answer 1

2

You can do this with ServerAlias:

ServerAlias example2.com example3.net

You can also use wildcards:

ServerAlias example2.com *.org *.net

If you want a “catch-all”, use *.* 👍🏻

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .