NextcloudPi - SSL killed apache

Hi, i was sent here, hope someone can help me :slight_smile:
I just installed NextcloudPi on my Pi4 and its running great so far. Wanted to make it avalibe to the Internet (Port 80 and 443 are open and domain is pointing to right ip).
I started letsencrypt via ip:4443, but it didnt work, did the same thing via the ncp-config via ssh and got some errors…
But it killed my apache2 server and i cant bring it back with “sudo service apache2 restart” its giving me an error (i know its a bit cut of):

Can someone help me with that?

apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2021-10-08 19:55:54 BST; 1min 4s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 1705 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Oct 08 19:55:53 nextcloudpi systemd[1]: Starting The Apache HTTP Server…
Oct 08 19:55:54 nextcloudpi apachectl[1705]: AH00526: Syntax error on line 5 of /etc/apache2/sites-enabled/ncp.conf
Oct 08 19:55:54 nextcloudpi apachectl[1705]: SSLCertificateFile: file ‘/etc/letsencrypt/live/xxx.xxx.de//fullchain.pem’ does not exist or is empty
Oct 08 19:55:54 nextcloudpi apachectl[1705]: Action ‘start’ failed.
Oct 08 19:55:54 nextcloudpi apachectl[1705]: The Apache error log may have more information.
Oct 08 19:55:54 nextcloudpi systemd[1]: apache2.service: Control process exited, code=exited, status=1/
Oct 08 19:55:54 nextcloudpi systemd[1]: apache2.service: Failed with result ‘exit-code’.
Oct 08 19:55:54 nextcloudpi systemd[1]: Failed to start The Apache HTTP Server.

I’m just going for a shot in the dark here …

It says you have a syntax error on line 5 in /etc/apache2/sites-enabled/ncp.conf

How does it look in the ncp.conf file?

1 Like

Letsencrypt does not work with alternate ports, it needs ports 80/443. Unless you use dns to verify.
Also for security reasons ncp.conf only allows local access.
If you need to access to ncp via :4443 from outside your LAN, you have to edit ncp.conf accordingly. It is advisable and safer to use ssh and ncp-config

1 Like