Dear all,
I’m new in setting up nextcloud on a Linux machine as I previously used my Synology NAS.
Now I’m trying to configure a dedicated PC with Ubuntu Server 22.04 LTS
I followed several guides and was able to :
- install ubuntu, configure apache2, configure php8.1
- successfully install Nextcloud 27 & nextoffice running collabora on the same PC.
- Create a wildcard Let’s encrypt certificate common to all my ovh subdomains.
As recommended I only use https.
Everything works when I start apache2, there’s no syntax error using apache2ctl -t
BUT
after a few hours (usually during the night) my nextcloud subdomain becomes unavailable.
Firefox tells me it could not negotiate a secure connexion. Nextcloud android app or windows desktop tells me host is unreachable.
Curl gives 000 (whereas it’s 302 when it works)
I activated default apache2 webserver on SSL 443 with another ServerName (which is a subdomain of the same domain, using the same let’s encrypt key) : It Works when nextcloud doesn’t.
I haven’t been able to figure out whether It comes from my nextcloud’s or apache’s configuration.
For the moment the only way to handle this issue is a cron job calling a script to check for CURL value and restart apache when it’s down…
Please help !
Nextcloud version (eg, 20.0.5): 27.0.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu server 22.04 LTS
Apache or nginx version (eg, Apache 2.4.25): 2.4.52
PHP version (eg, 7.4): 8.1
The issue you are facing: SSL error only for my nextcloud subdomain
Is this the first time you’ve seen this error? (Y/N): Y
The output of your Nextcloud log in Admin > Logging:
Nothing appears when my server is down… I cannot login at that moment.
Apache2 virtualhost (I rewrote it frome the let’s encrypt certbot generated file)
<VirtualHost *:443 *:8443>
DocumentRoot /var/www/nextcloud/
ServerName ****
ErrorLog ${APACHE_LOG_DIR}/nextcloud__error.log
CustomLog ${APACHE_LOG_DIR}/nextcloud__access.log combined
generated 2023-08-08, Mozilla Guideline v5.7, Apache 2.4.52, OpenSSL 3.0.2, intermediate configuration
Mozilla SSL Configuration Generator
this configuration requires mod_ssl, mod_socache_shmcb, mod_rewrite, and mod_headers
SSLEngine on
curl https://ssl-config.mozilla.org/ffdhe2048.txt >> /path/to signed_cert_and_intermediate_certs_and_dhparams
SSLCertificateFile /etc/letsencrypt/live//fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live//privkey.pem
enable HTTP/2, if available
Protocols h2 http/1.1
HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
Header always set Strict-Transport-Security “max-age=63072000; includeSubDomains”
<Directory /var/www/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
intermediate configuration
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305
SSLHonorCipherOrder off
SSLSessionTickets off
SSLUseStapling On
SSLStaplingCache “shmcb:logs/ssl_stapling(32768)”
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):