server {
listen 80 default_server;
listen [::]:80 default_server;
+ listen 443 default_server ssl;
server_name localhost;
root /var/www/{{ ansible_hostname }}/htdocs;
+ ssl_certificate /etc/pki/tls/certs/{{ ansible_fqdn }}-bundled.crt;
+ ssl_certificate_key /etc/pki/tls/private/{{ ansible_fqdn }}.key;
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+
location / {
autoindex on;
autoindex_exact_size off;
# More from distill:
text/plain manifest MD5SUM SHA1SUM SHA256SUM;
}
+
+ # Online Ubuntu repos
+ location /ubuntu/ {
+ autoindex on;
+ autoindex_exact_size off;
+ if ($scheme != "https") {
+ rewrite ^ https://$host$uri permanent;
+ }
+ }
}
server {