/
new-apache
/
sites-enabled
/
Upload File
HOME
<IfModule mod_ssl.c> <VirtualHost *:443> ServerName automationtest.subscriptionflow.com ServerAlias www.automationtest.subscriptionflow.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html/subscription-test-cases/reports ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/html/subscription-test-cases/reports> AllowOverride none Options +Indexes IndexOrderDefault Descending Date # Enable password protection AuthType Basic AuthName "Restricted Access" AuthUserFile /etc/apache2/.htpasswd Require valid-user </Directory> Include /etc/letsencrypt/options-ssl-apache.conf SSLCertificateFile /etc/letsencrypt/live/automationtest.subscriptionflow.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/automationtest.subscriptionflow.com/privkey.pem </VirtualHost> </IfModule> <IfModule mod_ssl.c> <VirtualHost *:80> ServerName automationtest.subscriptionflow.com ServerAlias www.automationtest.subscriptionflow.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html/subscription-test-cases/reports ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/html/subscription-test-cases/reports> Options Indexes FollowSymLinks IndexIgnore assets AllowOverride All # Enable password protection AuthType Basic AuthName "Restricted Access" AuthUserFile /etc/apache2/.htpasswd Require valid-user </Directory> # Redirect HTTP to HTTPS RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </VirtualHost> </IfModule>