File: //etc/apache2/sites-available/uphaar.online.conf
<VirtualHost *:80>
ServerName uphaar.online
ServerAlias www.uphaar.online
DocumentRoot /var/www/html/uphaar
<Directory "/var/www/html/uphaar">
Options -Indexes +FollowSymLinks
DirectoryIndex index.php index.html
AllowOverride All
Require all granted
</Directory>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
ErrorLog ${APACHE_LOG_DIR}/uphaar_online_error.log
CustomLog ${APACHE_LOG_DIR}/uphaar_online_access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerName uphaar.online
ServerAlias www.uphaar.online
DocumentRoot /var/www/html/uphaar
<Directory "/var/www/html/uphaar">
Options -Indexes +FollowSymLinks
DirectoryIndex index.php index.html
AllowOverride All
Require all granted
</Directory>
Alias "/reg" "/var/www/html/uphaar/app/vendor_account/"
<Directory "/var/www/htmluphaar/app/vendor_account/" >
Options -Indexes +FollowSymLinks
Require all granted
</Directory>
SSLEngine on
SSLCertificateFile /home/ubuntu/pki/uphaar_online_certificate.crt
SSLCertificateKeyFile /home/ubuntu/pki/uphaar_online_private.key
SSLCertificateChainFile /home/ubuntu/pki/uphaar_online_ca_bundle.crt
ErrorLog ${APACHE_LOG_DIR}/uphaar_online_error.log
CustomLog ${APACHE_LOG_DIR}/uphaar_online_access.log combined
</VirtualHost>