Nextcloud version: 30.0.0
Operating system and version: Debian 12 on proxmox lxc
Apache or nginx version: 2.4.62
PHP version: 8.3.12
Hello together
I set up my Nextcloud installation successful to this point, where I have to setup my apache server. The issue is the following: Everytime I use the apache2 configuration part: “AllowOverride All” I cant access my Nextcloud over the Web. Instead I get an error: 500 Internal Server Error
I found out that if I remove AllowOverride All
from my apache2.conf
and from nextcloud.conf
I can access my Nextcloud Instance normally. The problem is the critical security warnung in “Security and setup warnings”:
- “Your data directory and files are probably accessible from the internet. The .htaccess file is not working. It is strongly recommended that you configure your web server so that the data directory is no longer accessible, or move the data directory outside the web server document root.”
The issue exists, if I try to access Nextcloud over my internal IP, and if I try to access Nextcloud over my Domain, it should not be proxy related.
What causes this error and how can I fix it? It all seems to be apache2.
I saw many solutions where setting AllowOverride All
fixed the 500 but for me it causes the error.
Here are my configuration files and some logs. Let me now when you need something additional. Greetings Jonas
This is my apache2.conf
:
<Directory /var/www>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
And this is my nextcloud.conf
:
<VirtualHost *:80>
DocumentRoot /var/www/nextcloud/
ServerName 192.168.178.204
<Directory /var/www/nextcloud/>
Require all granted
AllowOverride All
Require all granted
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
</Directory>
</VirtualHost>
The output of your Nextcloud log in Admin > Logging:
No errors, exept some unrelated whiteboard issues i already fixed
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => 'REMOVED',
'passwordsalt' => 'REMOVED',
'secret' => 'REMOVED',
'trusted_domains' =>
array (
0 => '192.168.178.204',
1 => 'nc.domain.de',
),
'trusted_proxies' =>
array (
0 => '192.168.178.1/24',
),
'datadirectory' => '/var/www/nextcloud/data',
'dbtype' => 'mysql',
'version' => '30.0.0.14',
'overwrite.cli.url' => 'https://nc.domain.de/nextcloud',
'htaccess.RewriteBase' => '/nextcloud',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nc',
'dbpassword' => 'REMOVED',
'installed' => true,
'default_phone_region' => 'DE',
'maintenance_window_start' => 1,
'maintenance' => false,
);
The output of your Apache/nginx/system log in /var/log/____
:
[Fri Sep 27 15:26:49.994311 2024] [mpm_prefork:notice] [pid 183:tid 183] AH00163: Apache/2.4.62 (Debian) mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Sep 27 15:26:49.994416 2024] [core:notice] [pid 183:tid 183] AH00094: Command line: '/usr/sbin/apache2'
[Fri Sep 27 15:26:50.329989 2024] [proxy:error] [pid 191:tid 191] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php8.3-fpm.sock (localhost:8000) failed
[Fri Sep 27 15:26:50.330065 2024] [proxy_fcgi:error] [pid 191:tid 191] [client 192.168.178.208:54292] AH01079: failed to make connection to backend: localhost
[Fri Sep 27 15:29:24.437355 2024] [mpm_prefork:notice] [pid 183:tid 183] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Sep 27 15:29:24.630907 2024] [mpm_prefork:notice] [pid 495:tid 495] AH00163: Apache/2.4.62 (Debian) mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Sep 27 15:29:24.630986 2024] [core:notice] [pid 495:tid 495] AH00094: Command line: '/usr/sbin/apache2'
[Fri Sep 27 15:29:56.970044 2024] [mpm_prefork:notice] [pid 495:tid 495] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Sep 27 15:29:57.151356 2024] [mpm_prefork:notice] [pid 519:tid 519] AH00163: Apache/2.4.62 (Debian) mod_fcgid/2.3.9 configured -- resuming normal operations
[Fri Sep 27 15:29:57.151439 2024] [core:notice] [pid 519:tid 519] AH00094: Command line: '/usr/sbin/apache2'
[Fri Sep 27 15:30:01.238372 2024] [core:error] [pid 521:tid 521] [client 192.168.178.208:51730] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Fri Sep 27 15:30:31.043459 2024] [core:error] [pid 523:tid 523] [client 192.168.178.208:52188] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Fri Sep 27 15:30:31.467161 2024] [core:error] [pid 524:tid 524] [client 192.168.178.208:52196] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Fri Sep 27 15:30:32.638833 2024] [core:error] [pid 525:tid 525] [client 192.168.178.208:52204] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
No logs produced when the 500 error appears