<VirtualHost *:80>
    ServerName dummy
    DocumentRoot /var/www/html/clicqui.net/
    CustomLog /var/log/apache2/access_clicqui.net.log combined
    ErrorLog /var/log/apache2/error_clicqui.net.log

    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 "*"
    # 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 dummy
        CustomLog /var/log/apache2/access_clicqui.net.log combined
        ErrorLog /var/log/apache2/error_clicqui.net.log

        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/dummy/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/dummy/privkey.pem
    </VirtualHost>
</IfModule>