#
Create New Virtual Host Conf Files
By
Create .conf
files in /etc/httpd/conf.d
#IMPORTANT Main domains and sub-domains go in the same .conf file
nano /etc/httpd/conf.d/securezone.co.za.conf
Add the following in the conf file for both sub and main domain
conf
<VirtualHost *>
ServerName securezone.co.za
ServerAlias www.securezone.co.za
ServerAdmin charl@isa.co.za
DocumentRoot /var/www/securezone.co.za/public_html
<Directory /var/www/securezone.co.za/public_html>
Options -Indexes +FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/www/securezone.co.za/error.log
CustomLog /var/www/securezone.co.za/access.log combined
</VirtualHost>
<VirtualHost *>
ServerName api.securezone.co.za
ServerAlias securezone.co.za
ServerAdmin charl@isa.co.za
DocumentRoot /var/www/api.securezone.co.za/public_html/public
<Directory /var/www/api.securezone.co.za/public_html/public>
Options -Indexes +FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/www/api.securezone.co.za/error.log
CustomLog /var/www/api.securezone.co.za/access.log combined
</VirtualHost>
I also setup the website Philip Made
conf
<VirtualHost *>
ServerName old.securezone.co.za
ServerAlias securezone.co.za
ServerAdmin charl@isa.co.za
DocumentRoot /var/www/old.securezone.co.za/public_html/public
<Directory /var/www/old.securezone.co.za/public_html/public>
Options -Indexes +FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/www/old.securezone.co.za/error.log
CustomLog /var/www/old.securezone.co.za/access.log combined
</VirtualHost>
And a demo site for graphQL with a graphQL Playground
conf
<VirtualHost *>
ServerName graph.securezone.co.za
ServerAlias securezone.co.za
ServerAdmin charl@isa.co.za
DocumentRoot /var/www/graph.securezone.co.za/public_html/public
<Directory /var/www/graph.securezone.co.za/public_html/public>
Options -Indexes +FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/www/graph.securezone.co.za/error.log
CustomLog /var/www/graph.securezone.co.za/access.log combined
</VirtualHost>
Added Assets sub-domain for some assets and the theme
conf
<VirtualHost *>
ServerName assets.securezone.co.za
ServerAlias securezone.co.za
ServerAdmin charl@isa.co.za
DocumentRoot /var/www/assets.securezone.co.za/public_html
<Directory /var/www/assets.securezone.co.za/public_html>
Options -Indexes +FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/www/assets.securezone.co.za/error.log
CustomLog /var/www/assets.securezone.co.za/access.log combined
</VirtualHost>
Added Vite VueJs and Quasar App
conf
<VirtualHost *>
ServerName vue.securezone.co.za
ServerAlias securezone.co.za
ServerAdmin charl@isa.co.za
DocumentRoot /var/www/vue.securezone.co.za/public_html
<Directory /var/www/vue.securezone.co.za/public_html>
Options -Indexes +FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/www/vue.securezone.co.za/error.log
CustomLog /var/www/vue.securezone.co.za/access.log combined
</VirtualHost>
Restart httpd
systemctl restart httpd