Hi, i’m having some trouble trying to run nextcloud (nginx) over self signed certs. I used to have this configuration on ubuntu 20 without problems. Now i’m trying to do the sane on dietpi. I created a certificate for the IP of my rasp4 following this guide How To Create a Self-Signed SSL Certificate for Nginx on Debian 10 | DigitalOcean
Now i should add the server block in the nextcloud conf but i don’t know the right passage to do that. I just need to nave nextcloud on https for intranet connection so i can use the smartphone app.
I didn’t use certbot, i’m not sure i can with self-signed certs created with openssl. Following that guide i modified /etc/nginx/sites-available/default like this
# /etc/nginx/sites-available/default
server {
listen 443 ssl;
listen [::]:443 ssl;
include snippets/self-signed.conf;
include snippets/ssl-params.conf;
root /var/www/nextcloud;
index index.html index.htm index.nginx-debian.html;
server_name 192.168.xxx;
location / {
try_files $uri $uri/ =404;
}
}
server {
listen 80;
listen [::]:80;
server_name 192.168.xxx;
return 301 https://$server_name$request_uri;
}
connetting to nextcloud i recive the usual trust warning from firefox about the self signed certificate, but then nginx respond with a 404