server {
listen 80;
location ^~ /.well-known/acme-challenge/ {
alias /usr/local/www/acme/;
}
location / {
return 301 https://$server_name$request_uri;
}
}
#Nextcloud server
server {
listen 443 ssl;
server_name srv1.example.org;
ssl_certificate /usr/local/etc/ssl/acme/fullchain.pem;
ssl_certificate_key /usr/local/etc/ssl/acme/private/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!kEDH';
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
location / {
proxy_pass https://192.168.0.3;
}
}
#SeaFile server
server {
listen 443 ssl;
server_name srv2.example.org;
ssl_certificate /usr/local/etc/ssl/acme/fullchain.pem;
ssl_certificate_key /usr/local/etc/ssl/acme/private/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!kEDH';
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
location / {
proxy_pass https://192.168.0.4;
}
}
}