Beiträge von DesasterMaster
-
-
-
Ich habe nun die phpinfo.php in jedes der genannten Verzeichnisse kopiert und aufgerufen. Leider immer ohne Erfolg. Nun habe ich die phpinfo.php in index.php umbenannt und gegen die index.php im Verzeichnis /var/www/nextcloud/ ausgetauscht. So habe ich nun die gewünschten Infos.
Die ursprüngliche index.php habe ich danach wiederhergestellt, so das nun wieder die vorherige Fehlermeldung erscheint.
Ein Umweg aber er hat zum Ziel geführt.Aktuell läuft PHP Version 7.4.33
PHP8.1 ist bei update-alternatives --config php ausgewählt.
-
-
@DaVu ja, ist ein Schreibfehler. Es sollte /var/www/nextcloud/config/config.php heißen
Welches Verzeichnis ist das wo die phpinfo.php rein muss. Ich hatte sie im /var/www/html/ Verzeichnis. Das hat aber nicht funktioniert.
-
Der Ordner /var/www/html ist vorhanden und beinhaltet eine Datei index.html
Der Ordner /usr/share/nginx/html ist vorhanden und beinhaltet zwei Dateien index.html und 50x.htmlDen Ordner nginx habe ich hier gefunden
/var/cache/nginx
/var/[definition='1','0']log[/definition]/nginx
/usr/lib/nginx
/usr/share/doc/nginx
/usr/share/nginx
/etc/nginxDie NC config sieht so aus /vat/www/nextcloud/config/config.php
PHP
Alles anzeigen<?php $CONFIG = array ( 'instanceid' => 'xxxxxxx', 'passwordsalt' => 'xxxxxxxxxxxx', 'secret' => 'xxxx', 'trusted_domains' => array ( 0 => 'domain.de', ), 'datadirectory' => '/var/www/nextcloud/data', 'dbtype' => 'mysql', 'version' => '25.0.2.3', 'overwrite.cli.url' => 'http://domain.de/nextcloud', 'dbname' => 'nextcloud_db', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'user', 'dbpassword' => 'xxxxx', 'installed' => true, 'maintenance' => false, 'memcache.local' => '\\OC\\Memcache\\APCu', 'overwriteprotocol' => 'https', 'theme' => '', 'loglevel' => 0, 'log_type" => "file", 'logfile" => "nextcloud.[definition='1','0']log[/definition]", 'loglevel" => 3, 'logdateformat" => "F d, Y H:i:s", 'default_phone_region' => 'GB', 'updater.release.channel' => 'stable', 'filelocking.enabled' => true, 'app_install_overwrite' => array ( 0 => 'occweb', 1 => 'photosphereviewer', 2 => 'previewgenerator', 3 => 'gpxmotion', ), 'mail_from_address' => 'user', 'mail_smtpmode' => 'smtp', 'mail_sendmailmode' => 'smtp', 'mail_smtphost' => 'smtp.mail.de', 'mail_smtpauthtype' => 'LOGIN', 'mail_domain' => 'mail.de', 'mail_smtpauth' => 1, 'mail_smtpname' => 'user@email.de', 'mail_smtppassword' => 'xxxxxx', 'mail_smtpport' => '989', 'mail_smtpsecure' => 'tls', 'ldapIgnoreNamingRules' => false, 'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory', 'preview_max_x' => '2048', 'preview_max_y' => '2048', 'jpeg_quality' => '60', 'encryption.legacy_format_support' => false, 'ffmpeg' => '/usr/bin/ffmpeg', 'enable_previews' => true, 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\PNG', 1 => 'OC\\Preview\\JPEG', 2 => 'OC\\Preview\\GIF', 3 => 'OC\\Preview\\BMP', 4 => 'OC\\Preview\\XBitmap', 5 => 'OC\\Preview\\Movie', 6 => 'OC\\Preview\\PDF', 7 => 'OC\\Preview\\MP3', 8 => 'OC\\Preview\\TXT', 9 => 'OC\\Preview\\MarkDown', 10 => 'OC\\Preview\\MP4', 11 => 'OC\\Preview\\MOVIE', ), 'updater.secret' => 'xxxxxxx', );
/etc/nginx/nginx.conf
Code
Alles anzeigenuser www-data; worker_processes 1; error_log /var/[definition='1','0']log[/definition]/nginx/error.[definition='1','0']log[/definition] warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/[definition='1','0']log[/definition]/nginx/access.[definition='1','0']log[/definition] main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf; }
/etc/nginx/conf.d/domian.de.conf
Code
Alles anzeigenupstream php-handler { server unix:/run/php/php8.1-fpm.sock; } server { listen 80 default_server; listen [::]:80 ipv6only=on default_server; server_name domain.de.de 192.168.178.32; root /var/www; location ^~ /.well-known/acme-challenge { proxy_pass http://127.0.0.1:81; proxy_redirect off; } location / { # Enforce HTTPS # Use this if you always want to redirect to the DynDNS address (no local access). return 301 https://$server_name$request_uri; # Use this if you also want to access the server by local IP: #return 301 https://$server_addr$request_uri; } } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name domain.de 192.168.178.32; # Certificates used ssl_certificate /etc/letsencrypt/live/domain.de/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/domain.de/privkey.pem; # Not using TLSv1 will break: # Android <= 4.4.40 # IE <= 10 # IE mobile <=10 # Removing TLSv1.1 breaks nothing else! # TLSv1.3 is not supported by most clients, but it should be enabled. ssl_protocols TLSv1.2 TLSv1.3; # Cipher suite from https://cipherli.st/ # Max. security, but lower compatibility ssl_ciphers 'xxxx'; # Cipher suite from https://wiki.mozilla.org/Security/Server_Side_TLS #ssl_ciphers 'xxxx'; # (Modern) cipher suite from https://mozilla.github.io/server-side-tls/ssl-config-generator/ #ssl_ciphers 'xxxx'; # Diffie-Hellman parameter for DHE ciphersuites, recommended 4096 bits ssl_dhparam /etc/nginx/ssl/dhparams.pem; # Use multiple curves. # secp521r1: Not supported by Chrome # secp384r1: Not supported by Android (DAVdroid) ssl_ecdh_curve secp521r1:secp384r1:prime256v1; # Server should determine the ciphers, not the client ssl_prefer_server_ciphers on; # OCSP Stapling # fetch OCSP records from URL in ssl_certificate and cache them ssl_stapling on; ssl_stapling_verify on; # This should be chain.pem # See here: https://certbot.eff.org/docs/using.html ssl_trusted_certificate /etc/letsencrypt/live/domain.de/chain.pem; resolver 192.168.178.1; # SSL session handling ssl_session_timeout 24h; ssl_session_cache shared:SSL:50m; ssl_session_tickets off; # # Add headers to serve security related headers # # HSTS (ngx_http_headers_module is required) # In order to be recoginzed by SSL test, there must be an index.hmtl in the server's root add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload;"; add_header X-Content-Type-Options "nosniff"; add_header X-XSS-Protection "1; mode=block"; add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; add_header Referrer-Policy no-referrer; add_header X-Frame-Options "SAMEORIGIN"; # Remove X-Powered-By, which is an information leak fastcgi_hide_header X-Powered-By; location = / { # Disable access to the web root, otherwise nginx will show the default site here. deny all; } # # Nextcloud # location ^~ /nextcloud/ { # Set max. size of a request (important for uploads to Nextcloud) client_max_body_size 10G; # Besides the timeout values have to be raised in nginx' Nextcloud config, these values have to be raised for the proxy as well proxy_connect_timeout 3600; proxy_send_timeout 3600; proxy_read_timeout 3600; send_timeout 3600; proxy_buffering off; proxy_request_buffering off; proxy_max_temp_file_size 10240m; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://127.0.0.1:82; proxy_redirect off; } location ^~ /.well-known { # The rules in this block are an adaptation of the rules # in the Nextcloud `.htaccess` that concern `/.well-known`. location = /.well-known/carddav { return 301 $scheme://$host/nextcloud/remote.php/dav/; } location = /.well-known/caldav { return 301 $scheme://$host/nextcloud/remote.php/dav/; } location /.well-known/acme-challenge { try_files $uri $uri/ =404; } location /.well-known/pki-validation { try_files $uri $uri/ =404; } # Let Nextcloud's API for `/.well-known` URIs handle all other # requests by passing them to the front-end controller. return 301 $scheme://$host/nextcloud/index.php$request_uri; } location ^~ /emby/ { proxy_pass http://127.0.0.1:8096; # Local emby ip and non SSL port proxy_hide_header X-Powered-By; proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #Next three lines allow websockets proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location ^~ /tvheadend/ { proxy_pass http://127.0.0.1:9981; # Local tvheadend ip and non SSL port proxy_hide_header X-Powered-By; proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #Next three lines allow websockets proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location ^~ /oscam/ { proxy_pass http://127.0.0.1:8888; # Local oscam ip and non SSL port proxy_hide_header X-Powered-By; proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #Next three lines allow websockets proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
Das sind die einzigen config Dateien die zu finden waren. Neben der Reperatur versuche ich ja zu verstehen was der Grund dafür ist, das die NC nicht mehr funktioniert. Alleine werde ich es sicherlich nicht mehr zum laufen bekommen, allerdings ist die NC auch nur genutzt worden um mal gelegentlich Daten zu teilen. So gesehen ist es kein muss, dass sie wieder läuft. Dann würde ich die komplette Installation aber lieber restlos vom System entfernen. Dann weiß ich aber trotzdem nicht wie es hätte repariert werden können oder was der Grund für den Ausfall war
-
Ich hatte mal sudo -u www-data php /var/www/nextcloud/occ db:add-missing-columns gestestet
Code
Alles anzeigenAn unhandled exception has been thrown: Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:139 Stack trace: #0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\DB\Connection->connect() #1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\DBAL\Connection->getWrappedConnection() #2 /var/www/nextcloud/lib/private/DB/Connection.php(261): Doctrine\DBAL\Connection->executeQuery() #3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery() #4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(281): Doctrine\DBAL\Query\QueryBuilder->execute() #5 /var/www/nextcloud/lib/private/AppConfig.php(415): OC\DB\QueryBuilder\QueryBuilder->execute() #6 /var/www/nextcloud/lib/private/AppConfig.php(180): OC\AppConfig->loadConfigValues() #7 /var/www/nextcloud/lib/private/AppConfig.php(371): OC\AppConfig->getApps() #8 /var/www/nextcloud/lib/private/legacy/OC_App.php(965): OC\AppConfig->getValues() #9 /var/www/nextcloud/lib/private/Server.php(725): OC_App::getAppVersions() #10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\Server->OC\{closure}() #11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}() #12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(129): Pimple\Container->offsetGet() #13 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query() #14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query() #15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(184): OC\AppFramework\Utility\SimpleContainer->get() #16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}() #17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}() #18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(129): Pimple\Container->offsetGet() #19 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query() #20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query() #21 /var/www/nextcloud/lib/private/Server.php(1119): OC\AppFramework\Utility\SimpleContainer->get() #22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\Server->OC\{closure}() #23 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}() #24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(129): Pimple\Container->offsetGet() #25 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query() #26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query() #27 /var/www/nextcloud/lib/private/Server.php(2070): OC\AppFramework\Utility\SimpleContainer->get() #28 /var/www/nextcloud/lib/private/Files/View.php(117): OC\Server->getLockingProvider() #29 /var/www/nextcloud/lib/private/Server.php(462): OC\Files\View->__construct() #30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(162): OC\Server->OC\{closure}() #31 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}() #32 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(129): Pimple\Container->offsetGet() #33 /var/www/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\SimpleContainer->query() #34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(57): OC\ServerContainer->query() #35 /var/www/nextcloud/lib/private/Server.php(1472): OC\AppFramework\Utility\SimpleContainer->get() #36 /var/www/nextcloud/lib/base.php(617): OC\Server->boot() #37 /var/www/nextcloud/lib/base.php(1144): OC::init() #38 /var/www/nextcloud/console.php(48): require_once('...') #39 /var/www/nextcloud/occ(11): require_once('...')
-
-
Wie ich schon oben geschrieben habe, fehlen dann die PHP8 Module inkl. SQL. php8.1-mysqlnd
was fehlt hier noch?
Code
Alles anzeigensudo apt install php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8.1-imagick php8.1-cli php8.1-dev php8.1-imap php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-redis php8.1-intl -y Paketlisten werden gelesen… Fertig Abhängigkeitsbaum wird aufgebaut… Fertig Statusinformationen werden eingelesen… Fertig php8.1-cli ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-common ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-curl ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-dev ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-gd ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-imagick ist schon die neueste Version (3.7.0-3+ubuntu22.04.1+deb.sury.org+1). php8.1-imap ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-intl ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-mbstring ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-mysql ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-opcache ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-redis ist schon die neueste Version (5.3.7+4.3.0-2+ubuntu22.04.1+deb.sury.org+1). php8.1-soap ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-xml ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). php8.1-xmlrpc ist schon die neueste Version (3:1.0.0~rc3-5+ubuntu22.04.1+deb.sury.org+1). php8.1-zip ist schon die neueste Version (8.1.13-1+ubuntu22.04.1+deb.sury.org+1). 0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
-
Code
Alles anzeigenhttps://ip.de/phpinfo.php 404 Not Found nginx/1.21.5 https://ip.de/nextcloud/phpinfo.php Internal Server Error The server encountered an internal error and was unable to complete your request. Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report. More details can be found in the server [definition='1','0']log[/definition].
-
Daher die Idee, die alte Version zu entfernen und die docker Version zu installieren, so wie @DeBaschdi es erwähnte.
-
-
/var/[definition='1','0']log[/definition]/nginx/error.[definition='1','0']log[/definition]
Code2022/12/11 06:47:51 [error] 1518#1518: *1181 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: 209.141.55.120, server: domain.de, request: "GET /favicon.ico HTTP/1.1", host: "domain.de", referrer: "http://ip-meineIP.hsi16.unitymediagroup.de/favicon.ico" 2022/12/11 06:47:58 [error] 1518#1518: *1183 access forbidden by rule, client: 209.141.34.187, server: domain.de, request: "GET / HTTP/1.1", host: "domain.de", referrer: "http://meineIP" 2022/12/11 06:48:01 [error] 1518#1518: *1183 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: 209.141.34.187, server: domain.de, request: "GET /favicon.ico HTTP/1.1", host: "domain.de", referrer: "http://meineIP/favicon.ico" 2022/12/11 07:27:52 [error] 49778#49778: *1 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: meineIP, server: domain.de, request: "GET /favicon.ico HTTP/2.0", host: "domain.de", referrer: "https://domain.de/nextcloud/apps/files/?dir=/&fileid=7"
Der Pfad /etc/nginx/html/adminer existiert nicht/nicht mehr. Es scheint als wäre der gesamte Ordner /html nach dem Upgrade auf Ubuntu 22.04 verschwunden. -
/etc/nginx/conf.d/domain.de_nextcloud.conf
Code
Alles anzeigenserver { listen 127.0.0.1:82; server_name 127.0.0.1; # Path to the root of your installation root /var/www/; location = /robots.txt { allow all; log_not_found off; access_log off; } location ^~ /nextcloud { # set max upload size client_max_body_size 10G; fastcgi_buffers 64 4K; # Enable gzip but do not remove ETag headers gzip on; gzip_vary on; gzip_comp_level 4; gzip_min_length 256; gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy; # Uncomment if your server is build with the ngx_pagespeed module # This module is currently not supported. #pagespeed off; location /nextcloud { rewrite ^ /nextcloud/index.php$request_uri; } location ~ ^/nextcloud/(?:build|tests|config|lib|3rdparty|templates|data)/ { deny all; } location ~ ^/nextcloud/(?:\.|autotest|occ|issue|indie|db_|console) { deny all; } location ~ ^/nextcloud/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) { fastcgi_split_path_info ^(.+\.php)(/.+)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; # Important: disable HTTPS, otherwise no [definition='1','0']log[/definition] in will be possible! #fastcgi_param HTTPS on; fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice fastcgi_param front_controller_active true; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_intercept_errors on; # Raise timeout values. # This is especially important when the Nextcloud setup runs into timeouts (504 gateway errors) fastcgi_read_timeout 600; fastcgi_send_timeout 600; fastcgi_connect_timeout 600; fastcgi_request_buffering off; # Pass PHP variables directly to PHP. # This is usually done in the php.ini. For more flexibility, these variables are configured in the nginx config. # All the PHP parameters have to be set in one fastcgi_param. When using more 'fastcgi_param PHP_VALUE' directives, the last one will override all the others. fastcgi_param PHP_VALUE "open_basedir=/var/www:/tmp/:/var/nextcloud_data:/dev/urandom:/proc/meminfo upload_max_filesize = 10G post_max_size = 10G max_execution_time = 3600 max_input_time = 3600 output_buffering = off"; # Make sure that the real IP of the remote host is passed to PHP. fastcgi_param REMOTE_ADDR $http_x_real_ip; } location ~ ^/nextcloud/(?:updater|ocs-provider)(?:$|/) { try_files $uri/ =404; index index.php; } # Adding the cache control header for js and css files # Make sure it is BELOW the PHP block location ~* \.(?:css|js|woff2?|svg|gif)$ { try_files $uri /nextcloud/index.php$request_uri; proxy_set_header Cache-Control "public, max-age=15778463"; # Add headers to serve security related headers # Use 'proxy_set_header' (not 'add_header') as the headers have to be passed through a proxy. proxy_set_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload;"; proxy_set_header X-Content-Type-Options nosniff; proxy_set_header X-XSS-Protection "1; mode=block"; proxy_set_header X-Robots-Tag none; proxy_set_header X-Download-Options noopen; proxy_set_header X-Permitted-Cross-Domain-Policies none; proxy_set_header Referrer-Policy no-referrer; # Optional: Don't [definition='1','0']log[/definition] access to assets access_log off; } location ~* \.(?:png|html|ttf|ico|jpg|jpeg)$ { try_files $uri /nextcloud/index.php$request_uri; # Optional: Don't [definition='1','0']log[/definition] access to other assets access_log off; } } }
-
/etc/nginx/nginx.conf
Code
Alles anzeigenuser www-data; worker_processes 1; error_log /var/[definition='1','0']log[/definition]/nginx/error.[definition='1','0']log[/definition] warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/[definition='1','0']log[/definition]/nginx/access.[definition='1','0']log[/definition] main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf; }
/etc/nginx/conf.d/domain.de.confCode
Alles anzeigenupstream php-handler { server unix:/run/php/php7.2-fpm.sock; } server { listen 80 default_server; listen [::]:80 ipv6only=on default_server; server_name domain.de 192.168.178.32; root /var/www; location ^~ /.well-known/acme-challenge { proxy_pass http://127.0.0.1:81; proxy_redirect off; } location / { # Enforce HTTPS # Use this if you always want to redirect to the DynDNS address (no local access). return 301 https://$server_name$request_uri; # Use this if you also want to access the server by local IP: #return 301 https://$server_addr$request_uri; } } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name domain.de 192.168.178.32; # Certificates used ssl_certificate /etc/letsencrypt/live/domain.de/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/domain.de/privkey.pem; # Not using TLSv1 will break: # Android <= 4.4.40 # IE <= 10 # IE mobile <=10 # Removing TLSv1.1 breaks nothing else! # TLSv1.3 is not supported by most clients, but it should be enabled. ssl_protocols TLSv1.2 TLSv1.3; # Cipher suite from https://cipherli.st/ # Max. security, but lower compatibility ssl_ciphers 'xxxxx-xxxxx-xxxxx'; # Cipher suite from https://wiki.mozilla.org/Security/Server_Side_TLS #ssl_ciphers 'xxxxx-xxxxx-xxxxx'; # (Modern) cipher suite from https://mozilla.github.io/server-side-tls/ssl-config-generator/ #ssl_ciphers 'xxxxx-xxxxx-xxxxx'; # Diffie-Hellman parameter for DHE ciphersuites, recommended 4096 bits ssl_dhparam /etc/nginx/ssl/dhparams.pem; # Use multiple curves. # secp521r1: Not supported by Chrome # secp384r1: Not supported by Android (DAVdroid) ssl_ecdh_curve secp521r1:secp384r1:prime256v1; # Server should determine the ciphers, not the client ssl_prefer_server_ciphers on; # OCSP Stapling # fetch OCSP records from URL in ssl_certificate and cache them ssl_stapling on; ssl_stapling_verify on; # This should be chain.pem # See here: https://certbot.eff.org/docs/using.html ssl_trusted_certificate /etc/letsencrypt/live/domain.de/chain.pem; resolver 192.168.178.1; # SSL session handling ssl_session_timeout 24h; ssl_session_cache shared:SSL:50m; ssl_session_tickets off; # # Add headers to serve security related headers # # HSTS (ngx_http_headers_module is required) # In order to be recoginzed by SSL test, there must be an index.hmtl in the server's root add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload;"; add_header X-Content-Type-Options "nosniff"; add_header X-XSS-Protection "1; mode=block"; add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Permitted-Cross-Domain-Policies none; add_header Referrer-Policy no-referrer; add_header X-Frame-Options "SAMEORIGIN"; # Remove X-Powered-By, which is an information leak fastcgi_hide_header X-Powered-By; location = / { # Disable access to the web root, otherwise nginx will show the default site here. deny all; } # # Nextcloud # location ^~ /nextcloud/ { # Set max. size of a request (important for uploads to Nextcloud) client_max_body_size 10G; # Besides the timeout values have to be raised in nginx' Nextcloud config, these values have to be raised for the proxy as well proxy_connect_timeout 3600; proxy_send_timeout 3600; proxy_read_timeout 3600; send_timeout 3600; proxy_buffering off; proxy_request_buffering off; proxy_max_temp_file_size 10240m; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://127.0.0.1:82; proxy_redirect off; } location ^~ /.well-known { # The rules in this block are an adaptation of the rules # in the Nextcloud `.htaccess` that concern `/.well-known`. location = /.well-known/carddav { return 301 $scheme://$host/nextcloud/remote.php/dav/; } location = /.well-known/caldav { return 301 $scheme://$host/nextcloud/remote.php/dav/; } location /.well-known/acme-challenge { try_files $uri $uri/ =404; } location /.well-known/pki-validation { try_files $uri $uri/ =404; } # Let Nextcloud's API for `/.well-known` URIs handle all other # requests by passing them to the front-end controller. return 301 $scheme://$host/nextcloud/index.php$request_uri; } location ^~ /emby/ { proxy_pass http://127.0.0.1:8096; # Local emby ip and non SSL port proxy_hide_header X-Powered-By; proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #Next three lines allow websockets proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location ^~ /tvheadend/ { proxy_pass http://127.0.0.1:9981; # Local tvheadend ip and non SSL port proxy_hide_header X-Powered-By; proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #Next three lines allow websockets proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location ^~ /oscam/ { proxy_pass http://127.0.0.1:8888; # Local oscam ip and non SSL port proxy_hide_header X-Powered-By; proxy_set_header Range $http_range; proxy_set_header If-Range $http_if_range; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #Next three lines allow websockets proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
-
-
Sollte nginx sein
Code
Alles anzeigenAktive Internetverbindungen (Server und stehende Verbindungen) Proto Recv-Q Send-Q Local Address Foreign Address State Benutzer Inode PID/Program name tcp 0 0 0.0.0.0:42045 0.0.0.0:* LISTEN 0 28274 - tcp 0 0 0.0.0.0:38267 0.0.0.0:* LISTEN 126 32088 1500/rpc.statd tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 1000 98497 21900/sshd: PC@pt tcp 0 0 127.0.0.1:42979 0.0.0.0:* LISTEN 1000 35328 2632/rygel tcp 0 0 127.0.0.1:81 0.0.0.0:* LISTEN 0 28247 1517/nginx: master tcp 0 0 127.0.0.1:82 0.0.0.0:* LISTEN 0 28248 1517/nginx: master tcp 0 0 172.17.0.1:43229 0.0.0.0:* LISTEN 1000 59764 2632/rygel tcp 0 0 0.0.0.0:43827 0.0.0.0:* LISTEN 0 28200 1502/rpc.mountd tcp 0 0 0.0.0.0:47907 0.0.0.0:* LISTEN 0 28188 1502/rpc.mountd tcp 0 0 0.0.0.0:35630 0.0.0.0:* LISTEN 0 37455 1538/anydesk tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 101 21262 484/systemd-resolve tcp 0 0 0.0.0.0:7070 0.0.0.0:* LISTEN 0 32332 1538/anydesk tcp 0 0 192.168.178.32:44371 0.0.0.0:* LISTEN 1000 35329 2632/rygel tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 28243 1517/nginx: master tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 17641 1/init tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 0 32521 1473/cupsd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 31284 1513/sshd: /usr/sbi tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 0 32800 1889/master tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN 0 28254 - tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 0 31645 1648/smbd tcp 0 0 0.0.0.0:43501 0.0.0.0:* LISTEN 0 28179 1502/rpc.mountd tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 0 31644 1648/smbd tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 0 28245 1517/nginx: master tcp 0 0 192.168.178.32:22 192.168.178.21:53848 VERBUNDEN 0 97787 21811/sshd: PC [p tcp 0 0 192.168.178.32:35630 138.199.36.118:443 VERBUNDEN 0 32342 1538/anydesk tcp 0 176 192.168.178.32:22 192.168.178.21:53847 VERBUNDEN 0 96095 21780/sshd: PC [p tcp6 0 0 :::52853 :::* LISTEN 0 28183 1502/rpc.mountd tcp6 0 0 fe80::42:71ff:fe9:39277 :::* LISTEN 1000 61990 2632/rygel tcp6 0 0 :::9982 :::* LISTEN 0 26422 1520/tvheadend tcp6 0 0 :::9981 :::* LISTEN 0 26419 1520/tvheadend tcp6 0 0 :::34637 :::* LISTEN 0 28192 1502/rpc.mountd tcp6 0 0 fe80::7dbb:b140:8:44291 :::* LISTEN 1000 33577 2632/rygel tcp6 0 0 :::8092 :::* LISTEN 0 24052 582/hyperiond tcp6 0 0 :::8090 :::* LISTEN 0 25260 582/hyperiond tcp6 0 0 :::8096 :::* LISTEN 999 35851 1474/EmbyServer tcp6 0 0 ::1:631 :::* LISTEN 0 32520 1473/cupsd tcp6 0 0 ::1:35875 :::* LISTEN 1000 35330 2632/rygel tcp6 0 0 :::37627 :::* LISTEN 0 28208 1502/rpc.mountd tcp6 0 0 :::8888 :::* LISTEN 120 26425 1516/oscam tcp6 0 0 :::9000 :::* LISTEN 120 35369 1516/oscam tcp6 0 0 :::19400 :::* LISTEN 0 27751 582/hyperiond tcp6 0 0 :::19444 :::* LISTEN 0 27755 582/hyperiond tcp6 0 0 :::19445 :::* LISTEN 0 27750 582/hyperiond tcp6 0 0 :::50155 :::* LISTEN 126 32103 1500/rpc.statd tcp6 0 0 :::80 :::* LISTEN 0 28244 1517/nginx: master tcp6 0 0 :::111 :::* LISTEN 0 17237 1/init tcp6 0 0 :::22 :::* LISTEN 0 31286 1513/sshd: /usr/sbi tcp6 0 0 :::25 :::* LISTEN 0 32801 1889/master tcp6 0 0 :::2049 :::* LISTEN 0 28268 - tcp6 0 0 :::139 :::* LISTEN 0 31643 1648/smbd tcp6 0 0 ::1:6010 :::* LISTEN 1000 98496 21900/sshd: PC@pt tcp6 0 0 :::37327 :::* LISTEN 0 28276 - tcp6 0 0 :::445 :::* LISTEN 0 31642 1648/smbd tcp6 0 0 :::443 :::* LISTEN 0 28246 1517/nginx: master tcp6 0 0 192.168.178.32:33962 192.168.178.32:8096 TIME_WAIT 0 0 - tcp6 0 0 192.168.178.32:8090 192.168.178.21:53819 VERBUNDEN 0 96831 582/hyperiond udp 0 0 192.168.178.32:58884 0.0.0.0:* 1000 36350 2632/rygel udp 0 0 192.168.178.32:38659 0.0.0.0:* 999 36604 1474/EmbyServer udp 0 0 0.0.0.0:46891 0.0.0.0:* 117 25160 566/avahi-daemon: r udp 0 0 239.255.255.250:1900 0.0.0.0:* 1000 59752 2632/rygel udp 0 0 172.17.0.1:1900 0.0.0.0:* 1000 59751 2632/rygel udp 0 0 0.0.0.0:1900 0.0.0.0:* 999 36602 1474/EmbyServer udp 0 0 239.255.255.250:1900 0.0.0.0:* 1000 36348 2632/rygel udp 0 0 192.168.178.32:1900 0.0.0.0:* 1000 36347 2632/rygel udp 0 0 239.255.255.250:1900 0.0.0.0:* 1000 36343 2632/rygel udp 0 0 127.0.0.1:1900 0.0.0.0:* 1000 36342 2632/rygel udp 0 0 239.255.255.250:1900 0.0.0.0:* 120 34922 1520/tvheadend udp 0 0 0.0.0.0:1900 0.0.0.0:* 0 27768 582/hyperiond udp 0 0 127.0.0.1:49127 0.0.0.0:* 999 36605 1474/EmbyServer udp 0 0 0.0.0.0:53301 0.0.0.0:* 126 32085 1500/rpc.statd udp 0 0 127.0.0.53:53 0.0.0.0:* 101 21261 484/systemd-resolve udp 0 0 192.168.178.32:68 192.168.178.1:67 VERBUNDEN 0 25507 574/NetworkManager udp 0 0 0.0.0.0:111 0.0.0.0:* 0 17642 1/init udp 0 0 172.17.255.255:137 0.0.0.0:* 0 63995 1483/nmbd udp 0 0 172.17.0.1:137 0.0.0.0:* 0 63994 1483/nmbd udp 0 0 192.168.178.255:137 0.0.0.0:* 0 28382 1483/nmbd udp 0 0 192.168.178.32:137 0.0.0.0:* 0 28381 1483/nmbd udp 0 0 0.0.0.0:137 0.0.0.0:* 0 28360 1483/nmbd udp 0 0 172.17.255.255:138 0.0.0.0:* 0 63997 1483/nmbd udp 0 0 172.17.0.1:138 0.0.0.0:* 0 63996 1483/nmbd udp 0 0 192.168.178.255:138 0.0.0.0:* 0 28384 1483/nmbd udp 0 0 192.168.178.32:138 0.0.0.0:* 0 28383 1483/nmbd udp 0 0 0.0.0.0:138 0.0.0.0:* 0 28361 1483/nmbd udp 0 0 0.0.0.0:34988 0.0.0.0:* 0 28185 1502/rpc.mountd udp 0 0 0.0.0.0:57569 0.0.0.0:* 999 36603 1474/EmbyServer udp 0 0 0.0.0.0:35281 0.0.0.0:* 0 28173 1502/rpc.mountd udp 0 0 127.0.0.1:55785 0.0.0.0:* 1000 36345 2632/rygel udp 0 0 172.17.0.1:55878 0.0.0.0:* 1000 59754 2632/rygel udp 0 0 192.168.178.32:45650 192.168.178.1:53 VERBUNDEN 33 40065 1518/nginx: worker udp 0 0 0.0.0.0:631 0.0.0.0:* 0 32593 1754/cups-browsed udp 0 0 127.0.0.1:828 0.0.0.0:* 0 32079 1500/rpc.statd udp 0 0 0.0.0.0:50001 0.0.0.0:* 0 32575 1538/anydesk udp 0 0 0.0.0.0:48107 0.0.0.0:* 0 28273 - udp 0 0 0.0.0.0:54306 0.0.0.0:* 0 28194 1502/rpc.mountd udp 0 0 0.0.0.0:1194 0.0.0.0:* 0 32231 1487/openvpn udp 0 0 0.0.0.0:5353 0.0.0.0:* 0 27752 582/hyperiond udp 0 0 0.0.0.0:5353 0.0.0.0:* 0 25874 582/hyperiond udp 0 0 0.0.0.0:5353 0.0.0.0:* 117 25158 566/avahi-daemon: r udp6 0 0 :::56756 :::* 117 25161 566/avahi-daemon: r udp6 0 0 :::48954 :::* 126 32100 1500/rpc.statd udp6 0 0 ::1:1900 :::* 1000 36353 2632/rygel udp6 0 0 ff05::c:1900 :::* 1000 36354 2632/rygel udp6 0 0 fe80::7dbb:b140:86:1900 :::* 1000 36359 2632/rygel udp6 0 0 ff02::c:1900 :::* 1000 36360 2632/rygel udp6 0 0 fe80::42:71ff:fe90:1900 :::* 1000 61986 2632/rygel udp6 0 0 ff02::c:1900 :::* 1000 61987 2632/rygel udp6 0 0 :::57253 :::* 0 28190 1502/rpc.mountd udp6 0 0 fe80::42:71ff:fe9:32811 :::* 1000 61989 2632/rygel udp6 0 0 :::111 :::* 0 18986 1/init udp6 0 0 :::55656 :::* 120 34925 1520/tvheadend udp6 0 0 ::1:35275 :::* 1000 36356 2632/rygel udp6 0 0 :::59901 :::* 0 28181 1502/rpc.mountd udp6 0 0 fe80::7dbb:b140:8:56080 :::* 1000 36362 2632/rygel udp6 0 0 :::39867 :::* 0 28275 - udp6 0 0 :::7359 :::* 999 33351 1474/EmbyServer udp6 0 0 :::5353 :::* 0 27753 582/hyperiond udp6 0 0 :::5353 :::* 0 25875 582/hyperiond udp6 0 0 :::5353 :::* 117 25159 566/avahi-daemon: r udp6 0 0 :::34055 :::* 0 28202 1502/rpc.mountd
-
Ich nutze kein apache2. Die ganze Instanz läuft auf php 7.4.
Die Module sollten alle installiert sein.Code
Alles anzeigensudo update-alternatives --config php Es gibt 6 Auswahlmöglichkeiten für die Alternative php (welche /usr/bin/php bereitstellen). Auswahl Pfad Priorität Status ------------------------------------------------------------ 0 /usr/bin/php8.2 82 automatischer Modus 1 /usr/bin/php7.2 72 manueller Modus 2 /usr/bin/php7.3 73 manueller Modus * 3 /usr/bin/php7.4 74 manueller Modus 4 /usr/bin/php8.0 80 manueller Modus 5 /usr/bin/php8.1 81 manueller Modus 6 /usr/bin/php8.2 82 manueller Modus Drücken Sie die Eingabetaste, um die aktuelle Wahl[*] beizubehalten, oder geben Sie die Auswahlnummer ein:
-
-