<VirtualHost *:80>
    ServerName automation.staging.adaoncloud.com
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =automation.staging.adaoncloud.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName automation.staging.adaoncloud.com

        ProxyPreserveHost Off
        ProxyRequests Off
        ProxyPass / http://172.17.0.1:8002/
        ProxyPassReverse / http://172.17.0.1:8002/

        SSLCertificateFile /etc/letsencrypt/live/automation.staging.adaoncloud.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/automation.staging.adaoncloud.com/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf
    </VirtualHost>
</IfModule>
