Le problème : quand j'accède à cloud.nimajneb.eu le serveur renvoie une erreur 404
Je pense à un problème de permissions ou de configuration du site dans nginx ....
Suite à une dizaine de tentatives (d'installations et de désinstallations) , je n'arrive toujours pas à faire fonctionner nextcloud sur nginx...
Je tente depuis une semaine énormément de modifications des fichiers de configuration mais rien n'y fait et au final, je m'y perds...
Ma compréhension globale de l'interaction nginx/mariadb/php-fpm-legacy s'est améliorée mais je manque de connaissances/pratique pour régler le souci tout seul comme une grand
J'ai suivi (normalement) à la lettre ce tutoriel : https://wiki.archlinux.org/title/Nextcloud
J'utilise la branche php-legacy pour éviter les conflits lors des futures mises à jour.
Je vous laisse quelques sorties de commandes pour commencer et j'éditerai pour ajouter selon vos demandes pour améliorer la compréhension du souci.
Je vous remercie par avance pour vos retours.
Navré de faire du bruit pour des soucis qui doivent vous sembler basiques à résoudre...
51peg_b.
Log suite à la requête du navigateur :
Code : Tout sélectionner
cat /var/log/nginx/error.log
server: cloud.nimajneb.eu, request: "GET /login HTTP/1.1", host: "cloud.nimajneb.eu", referrer: "https://cloud.nimajneb.eu/"
2023/08/18 12:19:19 [error] 13853#13853: *4 open() "/usr/share/webapps/nextcloud/login" failed (2: No such file or directory),
Code : Tout sélectionner
lsl /usr/share/webapps/nextcloud/
total 172
drwxr-xr-x 13 root root 4096 18 août 11:55 .
drwxr-xr-x 3 root root 4096 18 août 11:55 ..
drwxr-xr-x 45 root root 4096 18 août 11:55 3rdparty
drwxr-xr-x 50 root root 4096 18 août 11:55 apps
-rw-r--r-- 1 root root 23796 10 août 23:36 AUTHORS
lrwxrwxrwx 1 root root 29 10 août 23:36 config -> /etc/webapps/nextcloud/config
-rw-r--r-- 1 root root 4095 10 août 23:36 console.php
-rw-r--r-- 1 root root 34520 10 août 23:36 COPYING
drwxr-xr-x 24 root root 4096 18 août 11:55 core
-rw-r--r-- 1 root root 6317 10 août 23:36 cron.php
drwxr-xr-x 2 root root 12288 18 août 11:55 dist
lrwxrwxrwx 1 root root 32 10 août 23:36 .htaccess -> /etc/webapps/nextcloud/.htaccess
-rw-r--r-- 1 root root 156 10 août 23:36 index.html
-rw-r--r-- 1 root root 3456 10 août 23:36 index.php
drwxr-xr-x 6 root root 4096 18 août 11:55 lib
-rwxr-xr-x 1 root root 283 10 août 23:36 occ
drwxr-xr-x 2 root root 4096 18 août 11:55 ocm-provider
drwxr-xr-x 2 root root 4096 18 août 11:55 ocs
drwxr-xr-x 2 root root 4096 18 août 11:55 ocs-provider
-rw-r--r-- 1 root root 3187 10 août 23:36 public.php
-rw-r--r-- 1 root root 5597 10 août 23:36 remote.php
drwxr-xr-x 4 root root 4096 18 août 11:55 resources
-rw-r--r-- 1 root root 26 10 août 23:36 robots.txt
-rw-r--r-- 1 root root 2452 10 août 23:36 status.php
drwxr-xr-x 3 root root 4096 18 août 11:55 themes
drwxr-xr-x 2 root root 4096 18 août 11:55 updater
-rw-r--r-- 1 root root 101 10 août 23:36 .user.ini
-rw-r--r-- 1 root root 383 10 août 23:36 version.php
lrwxrwxrwx 1 root root 23 10 août 23:36 wapps -> /var/lib/nextcloud/apps
Code : Tout sélectionner
cat /etc/nginx/sites-enabled/cloud.nimajneb.eu.conf
server {
server_name cloud.nimajneb.eu;
root /usr/share/webapps/nextcloud/;
location = /favicon.ico {
log_not_found off;
}
location ~ \.php(?:$|/) {
# Required for legacy support
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS on;
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass unix:/run/php-fpm-legacy/nextcloud.sock;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
fastcgi_max_temp_file_size 0;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/cloud.nimajneb.eu/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/cloud.nimajneb.eu/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = cloud.nimajneb.eu) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name cloud.nimajneb.eu;
listen 80;
return 404; # managed by Certbot
}
Fichier de conf nextcloud :
Code : Tout sélectionner
cat /etc/webapps/nextcloud/config/config.php
<?php
$CONFIG = array (
'datadirectory' => '/var/lib/nextcloud/data',
'logfile' => '/var/log/nextcloud/nextcloud.log',
'apps_paths' =>
array (
0 =>
array (
'path' => '/usr/share/webapps/nextcloud/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/lib/nextcloud/apps',
'url' => '/wapps',
'writable' => true,
),
),
'trusted_domains' =>
array (
0 => 'cloud.nimajneb.eu',
),
'overwrite.cli.url' => 'https://cloud.nimajneb.eu/',
'htaccess.RewriteBase' => '/',
'passwordsalt' => '----',
'secret' => '---',
'dbtype' => '----',
'version' => '27.0.2.1',
'dbname' => '----',
'dbhost' => 'localhost:/run/mysqld/mysqld.sock',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => ''----'',
'dbpassword' => ''----'',
'installed' => true,
'instanceid' => ''----'',
);