File: //etc/apache2/sites-available/app.vaspayment.com.conf
<VirtualHost *:80>
ServerAdmin webmaster@app.vaspayment.com
ServerName app.vaspayment.com
DocumentRoot /var/www/app.vaspayment.com
<Directory /var/www/app.vaspayment.com>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/app.vaspayment.com_error.log
CustomLog ${APACHE_LOG_DIR}/app.vaspayment.com_access.log combined
# Redirect HTTP traffic to HTTPS
RewriteEngine on
RewriteCond %{SERVER_NAME} =app.vaspayment.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>