Docy

Configure Apache for WildCard SSL (manual setups)

Estimated reading: 2 minutes 2451 views

In order to create WildCard domain for global access, we need to create WildCard DNS entry (A entry) for the subdomains on our DNS server.

IE: *.example.com for our base domain entry (example.com).

This way, all incoming traffic will be recognized and will be routed in the proper domain.


Step 1:

You will need to configure the Apache config file /etc/apache2/sites-available/000-default.conf. In most cases (new installations), this configuration file, includes the following contents:

<VirtualHost *:80>
 #ServerName www.example.com
 ServerAdmin webmaster@localhost
 DocumentRoot /var/www/html
</VirtualHost>

You will need to edit these contents, uncomment ServerName and replace contents according to your domain’s preferences.
In the example below, we will use themesic.com domain for our Perfex SaaS module WildCard Installation:

<VirtualHost *:80>
 ServerName themesic.com
 ServerAlias *.themesic.com
 ServerAdmin webmaster@localhost
 DocumentRoot /var/www/html
</VirtualHost>

Step 2:

After making the proper changes, you will need to contact to the host provider, in order to add the WildCard DNS entry in your DNS zone.

If you handle the DNS zone on your own, you can do that manually. Here’s an example of adding a WildCard DNS entry in CloudFlare: https://developers.cloudflare.com/dns/manage-dns-records/reference/wildcard-dns-records/

Share this Documentation
CONTENTS