File: //etc/httpdbackup/conf.d/vhosts.conf
<VirtualHost *:80>
DocumentRoot /var/www/html/punjabcabs/public
ServerName punjabcabs.com.au
ServerAlias www.punjabcabs.com.au
ErrorLog logs/punjabcabs.com.au-error_log
CustomLog logs/punjabcabs.com.au-access_log common
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
##### To enable force redirect to www and https
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<Directory /var/www/html/punjabcabs/public>
AllowOverride all
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/xml
</IfModule>
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/html/pmw24
ServerName pmw24.com.au
ServerAlias pmw24.com.au
ErrorLog logs/pmw.fitser.com-error_log
CustomLog logs/pmw24.com.au-access_log common
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
##### To enable force redirect to www and https
# RewriteCond %{HTTP_HOST} !^www\.
# RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# RewriteCond %{HTTPS} off
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<Directory /var/www/html/pmw24>
AllowOverride all
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/xml
</IfModule>
</Directory>
</VirtualHost>