Required Information
DietPi version | 9
Distro version | bookworm
Kernel version | Linux DietPi 6.6.62+rpt-rpi-2712
Architecture | arm64
SBC model | RPi5
Power supply used | Beseus 100w PD
SD card used | SanDisk Extreme 128Gb + Samsung Evo 970 + Data X8200Pro
Additional Information (if applicable)
Software title: Nextcloud
My question is how to get access via https in local network. I need that to share eg links for my friends when they come and want to sent them some big files. Links are only generated when nextcloud is accessed with ssl (can be self signed, no difference for me)
You need to create a self signed certificate and activate SSL within web server config. As this is quite specific to web server used
I’m using apache - dietpi installer mentioning it’s easiest one
OK, so i did:
mkdir /etc/apache2/ssl
cd /etc/apache2/ssl
openssl genrsa -out nextcloud.key 2048
openssl req -new -key nextcloud.key -out nextcloud.csr
openssl x509 -req -days 999 -in nextcloud.csr -signkey nextcloud.key -out nextcloud.crt
cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/default-ssl.conf.bak
cp /etc/apache2/ssl/nextcloud.key /etc/ssl/private/nextcloud.key
cp /etc/apache2/ssl/nextcloud.crt /etc/ssl/certs/nextcloud.crt
nano /etc/apache2/sites-available/default-ssl.conf
I changed lines to:
SSLCertificateFile /etc/ssl/certs/nextcloud.crt
SSLCertificateKeyFile /etc/ssl/private/nextcloud.key
edited this files:
nano /etc/apache2/sites-available/000-default.conf
added redirection and then executed:
a2enmod ssl
a2ensite default-ssl
apache2ctl configtest
response was:
AH00112: Warning: DocumentRoot [/var/www/html] does not exist
Syntax OK
did:
systemctl restart apache2
I went to <my_ip>/nextcloud, had warning about certificate and when press allow anyway i have white page with:
Not Found
The requested URL was not found on this server.
On DietPi our default is /var/www
1 Like