Skip to main content

Virtual Host

Okay, I'm sorry we've just called this Virtual Host, however that is exactly what it is, however to normal humans like ourselves, this is the configuration file which allows our domain (hostname) to show Ticaga.

You need to create a DNS Record for the subdomain (support.ticaga.com) if you aren't using your own domain for Ticaga (ticaga.com). We recommend a Subdomain for Ticaga to keep it away from your main website just for security, we recommend the same for a billing system like Blesta, WHMCS or ClientExec, keep them separate from Ticaga and your website.

Let's create the ticaga configuration file, in our example we're installing on https://ubuntu.ticaga.com for testing:

sudo nano /etc/apache2/sites-available/ubuntu.ticaga.com.conf

Paste and edit the following for your needs:

<VirtualHost *:80>
     ServerName ubuntu.ticaga.com
     DocumentRoot /var/www/ticaga/public
     <Directory /var/www/ticaga/public>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
          <Files .env>
                Order allow,deny
                Deny from all
          </Files>
     </Directory>
     ErrorLog ${APACHE_LOG_DIR}/ubuntu.ticaga.com_error.log
     CustomLog ${APACHE_LOG_DIR}/ubuntu.ticaga.com.log combined
</VirtualHost>

You need to keep the /public folder because if you don't you'll expose all the Laravel files in the Ticaga installation.

Now we need to activate our new config:

sudo a2ensite ubuntu.ticaga.com.conf

And disable the default one:

sudo a2dissite 000-default.conf

Now restart Apache:

systemctl reload apache2