<VirtualHost *:80>
    ServerName bmcgroup.com.vn
    ServerAlias www.bmcgroup.com.vn

    DocumentRoot /var/www/BmcWebsite/BMC-WEBSITE-DONE/

    Alias /media /var/www/BmcWebsite/BMC-WEBSITE-DONE/media

    <Directory /var/www/BmcWebsite/BMC-WEBSITE-DONE/media>
        Require all granted
    </Directory>

    <Directory /var/www/BmcWebsite/BMC-WEBSITE-DONE/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    WSGIScriptAlias / /var/www/BmcWebsite/BMC-WEBSITE-DONE/BMC/wsgi.py

    <Directory /var/www/BmcWebsite/BMC-WEBSITE-DONE/BMC>
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.bmcgroup.com.vn [OR]
RewriteCond %{SERVER_NAME} =bmcgroup.com.vn
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
