Vacuna - Automatic Sites

Automatic Sites

Here is a simple configuration that listen on port 80 and 443, it will automatically generate ssl certificate using lets' encrypt and store them in /var/lib/certs/, it will look for the websites in the var /var/www/

server {
    listen "0.0.0.0:80"
    listen "0.0.0.0:443" {
        ssl {
            acme {
                contacts "test@example.com"
                store "/var/lib/certs/"
            } 
         }
     }
     auto "/var/www/"
} 

The /var/www should have a structure similar to this:

├── beautiful.uno
│   ├── index.html
│   └── other.html
├── first.com
│   └── index.html
└── shallwe.net
    ├── folder
    │   ├── index.html
    │   └── page.html
    └── index.html

Where the folders are the website domain name, and the content inside the folder is the actual website. The folder name will be used as well for the certificate generation