<VirtualHost *:80>
    DocumentRoot /var/www/html/empty
    ServerName 51.178.131.117
    ServerAlias 10.9.0.1
    CustomLog /var/log/apache2/access.log combined
    RewriteEngine on
    <Directory /var/www/html/empty>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot /var/www/html/empty
    CustomLog /var/log/apache2/access.log combined

    ServerName 51.178.131.117
    RewriteEngine on
    <Directory /var/www/html/empty>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot /var/www/html/smssmart
    ServerName staging.adaoncloud.com
    CustomLog /var/log/apache2/access.log combined

    RewriteEngine on
    <Directory /var/www/html/smssmart>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    Header set Access-Control-Allow-Origin "*"
    # RewriteCond %{HTTP:X-Forwarded-Proto} ^$
    # RewriteCond %{SERVER_NAME} =staging.adaoncloud.com
    # RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
    <VirtualHost *:443>
        DocumentRoot /var/www/html/smssmart
        ServerName staging.adaoncloud.com
        ServerAlias go2tec.adaoncloud.com demo.staging.adaoncloud.com
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        <Directory /var/www/html/smssmart>
            Options -Indexes +FollowSymLinks +MultiViews -SymLinksIfOwnerMatch
            AllowOverride All
            Require all granted
        </Directory>
        Header always set Access-Control-Allow-Origin "*"
        Header always set Access-Control-Allow-Headers "Content-Type, origin, accept"
        Include /etc/letsencrypt/options-ssl-apache.conf

        SSLCertificateFile /etc/letsencrypt/live/staging.adaoncloud.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/staging.adaoncloud.com/privkey.pem
    </VirtualHost>
</IfModule>