Hallo zusammen,
Da ich vergangen mein Server neu installieren musste, möchte ich auch wieder Nextcloud installieren.
Aber leider kommt im Browser links oben “Access Denied.”
Woran kann das liegen?
Hier meine Konfiguration:
Apache2-Konfiguration (mit SSL):
<IfModule mod_ssl.c>
SSLUseStapling on
SSLStaplingCache shmcb:/var/run/ocsp(128000)
<VirtualHost *:443>
ServerName skbcloud.skayritarbase.de
ServerAlias skbcloud.skayritarbase.de
ServerAdmin webmaster@skayritarbase.de
Alias /nextcloud "/var/www/html/nextcloud/"
DocumentRoot /var/www/html/nextcloud
Header always set Strict-Transport-Security "max-age=15768000; preload;includeSubdomains"
Header always set Referrer-Policy „strict-origin-when-cross-origin“
# Prevent MIME based attacks
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options "SAMEORIGIN"
SSLEngine on
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder On
SSLOpenSSLConfCmd DHParameters "/etc/ssl/certs/dhparam.pem"
SSLCertificateFile /etc/letsencrypt/live/skbcloud.skayritarbase.de/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/skbcloud.skayritarbase.de/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
Protocols h2 h2c http/1.1
CustomLog /var/log/apache2/skbcloud.skayritarbase.de-access.log combined
ErrorLog /var/log/apache2/skbcloud.skayritarbase.de-error.log
<FilesMatch "\.php$">
<If "-f %{REQUEST_FILENAME}">
SetHandler "proxy:unix:/run/php/nextcloud-php.sock|fcgi://localhost"
</If>
</FilesMatch>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{REQUEST_METHOD} ^TRACK
RewriteRule .* - [R=405,L]
<Directory /var/www/html/nextcloud/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
Satisfy Any
</Directory>
<IfModule mod_dav.c>
Dav off
</IfModule>
<Directory /home/nextcloud/>
Require all denied
</Directory>
<Files ".ht*">
Require all denied
</Files>
SetEnv HOME /var/www/html/nextcloud
SetEnv HTTP_HOME /var/www/html/nextcloud
SuexecUserGroup www-data www-data
<IfModule mod_reqtimeout.c>
RequestReadTimeout body=0
</IfModule>
</VirtualHost>
</IfModule>
Und hier sinf Auszüge aus den Logs:
PHP-Konfiguration (/etc/php/8.1/fpm/pool.d/nextcloud-php.conf):
[nextcloud]
user = www-data
group = www-data
listen = /run/php/nextcloud-php.sock
listen.backlog = 4096
listen.owner = www-data
listen.group = www-data
listen.mode = 0666
pm = dynamic
pm.max_children = 120
pm.start_servers = 8
pm.min_spare_servers = 4
pm.max_spare_servers = 8
pm.max_requests = 40
;env[HOSTNAME] = vmd32791.contaboserver.net
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp/nextcloud
env[TMPDIR] = /tmp/nextcloud
env[TEMP] = /tmp/nextcloud
request_terminate_timeout = 120
php_admin_value[memory_limit] = 1024M
php_admin_value[upload_max_filesize] = 16G
php_admin_value[post_max_size] = 16G
php_admin_value[date.timezone] = Europe/Berlin
php_admin_value[expose_php] = Off
php_admin_value[allow_url_fopen] = Off
php_admin_value[upload_max_filesize] = 32M
php_admin_value[session.gc_maxlifetime] = 86000
php_admin_value[max_execution_time] = 120
php_value[display_errors] = On
php_admin_value[cgi.fix_pathinfo] = 0
php_admin_value[opcache.enable] = 1
php_admin_value[opcache.enable_cli] = 1
php_admin_value[opcache.interned_strings_buffer] = 8
php_admin_value[opcache.max_accelerated_files] = 10000
php_admin_value[opcache.memory_consumption] = 128
;php_admin_value[opcache.validate_timestamps] = 0
php_admin_value[opcache.save_comments] = 1
php_admin_value[opcache.revalidate_freq] = 1
Auszug aus /var/www/html/nextcloud/data/nextcloud.log
{"reqId":"gG8nwV64FaCuRqI5GSf4","level":2,"time":"2023-01-29T19:35:14+00:00","remoteAddr":"5.10.6.46","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0","version":"","data":[]}
{"reqId":"gG8nwV64FaCuRqI5GSf4","level":2,"time":"2023-01-29T19:35:14+00:00","remoteAddr":"5.10.6.46","user":"--","app":"no app in context","method":"POST","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0","version":"","data":[]}
{"reqId":"gG8nwV64FaCuRqI5GSf4","level":3,"time":"2023-01-29T19:35:22+00:00","remoteAddr":"5.10.6.46","user":"skbncadmin","app":"PHP","method":"POST","url":"/index.php","message":"exif_read_data(): File not supported at /var/www/html/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0","version":"25.0.3.2","exception":{"Exception":"Error","Message":"exif_read_data(): File not supported at /var/www/html/nextcloud/lib/private/Metadata/Provider/ExifProvider.php#59","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/Metadata/Provider/ExifProvider.php","line":59,"function":"exif_read_data"},{"file":"/var/www/html/nextcloud/lib/private/Metadata/MetadataManager.php","line":68,"function":"execute","class":"OC\\Metadata\\Provider\\ExifProvider","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Metadata/FileEventListener.php","line":101,"function":"generateMetadata","class":"OC\\Metadata\\MetadataManager","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OC\\Metadata\\FileEventListener","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/HookConnector.php","line":118,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Hook.php","line":106,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/View.php","line":641,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/Files/View.php","line":692,"function":"emit_file_hooks_post","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/File.php","line":71,"function":"file_put_contents","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Util.php","line":257,"function":"putContent","class":"OC\\Files\\Node\\File","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_Util.php","line":216,"function":"copyr","class":"OC_Util","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/User/Session.php","line":553,"function":"copySkeleton","class":"OC_Util","type":"::"},{"file":"/var/www/html/nextcloud/lib/private/User/Session.php","line":403,"function":"prepareUserLogin","class":"OC\\User\\Session","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/User/Session.php","line":616,"function":"completeLogin","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/User/Session.php","line":355,"function":"loginWithPassword","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/Setup.php","line":433,"function":"login","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/core/Controller/SetupController.php","line":69,"function":"install","class":"OC\\Setup","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/base.php","line":980,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
und aus Apache2 error.log:
Sun Jan 29 20:35:28.460071 2023] [proxy_fcgi:error] [pid 1463:tid 139841342268992] [client 5.10.6.46:25747] AH01071: Got error 'Access to the script '/var/www/html/nextcloud/core/apps/recommended' has been denied (see security.limit_extensions)'
[Sun Jan 29 20:35:28.774986 2023] [proxy_fcgi:error] [pid 1463:tid 139841342268992] [client 5.10.6.46:25747] AH01071: Got error 'Access to the script '/var/www/html/nextcloud/apps/dashboard/' has been denied (see security.limit_extensions)'
Informationen zu meinem System:
Betriebssystem: Ubuntu 22.04
Webserver: Apache2 2.4.52
PHP: 8.1
Datenbank: MariaDB 10.6
Server: VPS-Server bei Contabo