<VirtualHost *:80>
- ServerName SERVER_NAME_PLACEHOLDER
- DocumentRoot /path/to/STORE_PLACEHOLDER
+ ServerName YOUR_SERVER
+
+ # Redirect root requests to the https version
+ Redirect permanent / https://YOUR_SERVER
+
+ # If there's some additional stuff in the URI, send that too
+ RewriteEngine on
+ RewriteCond %{SERVER_NAME} =YOUR_SERVER
+ RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerName YOUR_SERVER
+ DocumentRoot /path/to/parent/of/dists
- <Directory /path/to/STORE_PLACEHOLDER>
+ <Directory /path/to/parent/of/dists>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
- </Directory>
+ </Directory>
+
+ # Use SSL/TLS Encryption - you may have to regenerate certificate to add new
+ # subdomain if you added one to your server
+ SSLEngine on
+ Include /etc/letsencrypt/options-ssl-apache.conf
+ SSLCertificateFile /path/to/fullchain/cert
+ SSLCertificateKeyFile /path/to/private/cert
- ErrorLog ${APACHE_LOG_DIR}/debian-repo-error.log
+ ErrorLog ${APACHE_LOG_DIR}/debian-repo-error.log
CustomLog ${APACHE_LOG_DIR}/debian-repo-access.log combined
-</VirtualHost>
\ No newline at end of file
+</VirtualHost>