<VirtualHost *:80>
    DocumentRoot /var/www/html/clicqui.net
        ServerName questit.clicqui.net
    ErrorLog /var/log/apache2/questit.clicqui.net-error.log
    CustomLog /var/log/apache2/questit.clicqui.net-access.log combined

    ProxyErrorOverride On
    <Directory /var/www/html/clicqui.net>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    Header set Access-Control-Allow-Origin "*"
    RewriteCond %{HTTP:X-Forwarded-Proto} ^$
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

</VirtualHost>
<IfModule mod_ssl.c>
    <VirtualHost *:443>
        DocumentRoot /var/www/html/clicqui.net
        ServerName questit.clicqui.net
        ServerAlias sta-clicqui.adaoncloud.com
        ErrorLog ${APACHE_LOG_DIR}/questit.clicqui.net-error.log
        CustomLog ${APACHE_LOG_DIR}/questit.clicqui.net-access.log combined

        Alias /img /var/www/html/smssmart/img
        Alias /js /var/www/html/smssmart/js
        Alias /css /var/www/html/smssmart/css

        <Directory /var/www/html/clicqui.net>
            Options -Indexes +FollowSymLinks +MultiViews
            AllowOverride All
            Require all granted
        </Directory>
        Header set Access-Control-Allow-Origin "*"
        Include /etc/letsencrypt/options-ssl-apache.conf
        SSLCertificateFile /etc/letsencrypt/live/questit.clicqui.net/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/questit.clicqui.net/privkey.pem
    </VirtualHost>
</IfModule>