#
createConfFiles
title: Create New Virtual Host Conf Files label: Server & Software Setup order: 100 authors:
- name: Charl Cronje email: charl@webally.co.za link: https://blog.webally.co.za avatar: https://assets.webally.co.za/avatars/darker.jpg edit: repo: "https://github.com/charlpcronje/setup.docs.devserv.me/edit/" base: /src branch: main label: Edit on GitHub editor: enabled: false favicon: favicon.png links:
- text: Projects Portfolio link: https://webally.co.za/projects
- text: Wiki, Tips and Docs link: https://docs.webally.co.zao.za
- text: Resume link: https://cv.webally.co.za
- text: LinkedIn link: https://www.linkedin.com/in/charlpcronje
- text: GitHub link: https://github.com/charlpcronje
- text: Upwork Profile link: https://www.upwork.com/freelancers/~01ccb1439024ec9c50 footer: copyright: "webAlly © Copyright . All rights reserved."---
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