# nginx reverse proxy for nextcloud server { server_name cloud.s1gm4.eu; listen 80; listen [::]:80; # Redirect to https location / { redirect 302 https://localhost:8080$request_uri; } # For dehydrated ssl certification location /.well-known/acme-challenge { alias /var/www/dehydrated; } } server { # SSL configuration # listen 443 ssl; listen [::]:443 ssl; # ssl_certificate /var/www/dehydrated/certs/cloud.s1gm4.eu/fullchain.pem; ssl_certificate_key /var/www/dehydrated/certs/cloud.s1gm4.eu/privkey.pem; # Add index.php to the list if you are using PHP index index.html index.htm index.php; server_name cloud.s1gm4.eu; # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; } # For dehydrated ssl certification location /.well-known/acme-challenge { alias /var/www/dehydrated; } }