Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
nextcloud:installation [2019/04/13 09:56] – [Apache] madko | nextcloud:installation [2019/04/16 07:11] (Version actuelle) – madko | ||
---|---|---|---|
Ligne 16: | Ligne 16: | ||
systemctl enable --now httpd | systemctl enable --now httpd | ||
</ | </ | ||
- | |||
===== PHP ===== | ===== PHP ===== | ||
Ligne 64: | Ligne 63: | ||
mysql> GRANT ALL ON nextcloud.* TO nextcloud@localhost IDENTIFIED BY ' | mysql> GRANT ALL ON nextcloud.* TO nextcloud@localhost IDENTIFIED BY ' | ||
</ | </ | ||
+ | |||
+ | ===== NextCloud ===== | ||
+ | |||
+ | Téléchargement de nextcloud : | ||
+ | |||
+ | < | ||
+ | wget https:// | ||
+ | </ | ||
+ | |||
+ | Installation de nextcloud dans / | ||
+ | |||
+ | < | ||
+ | unzip nextcloud-15.0.7.zip -d / | ||
+ | </ | ||
+ | |||
+ | Déplacer tous les fichier de / | ||
+ | |||
+ | < | ||
+ | chown -R apache. / | ||
+ | </ | ||
+ | |||
+ | ===== SELinux ===== | ||
+ | |||
+ | Il faut autoriser php-fpm à faire des execmem : | ||
+ | |||
+ | < | ||
+ | setsebool -P httpd_execmem 1 | ||
+ | </ | ||
+ | |||
+ | Il faut relancer le service php-fpm : | ||
+ | |||
+ | < | ||
+ | systemctl restart php73-php-fpm | ||
+ | </ | ||
+ | |||
+ | Le reste concerne les contextes par défaut des fichiers nextcloud, surtout ceux où nextcloud doit pouvoir écrire : | ||
+ | |||
+ | < | ||
+ | semanage fcontext -a -t httpd_sys_rw_content_t '/ | ||
+ | semanage fcontext -a -t httpd_sys_rw_content_t '/ | ||
+ | semanage fcontext -a -t httpd_sys_rw_content_t '/ | ||
+ | semanage fcontext -a -t httpd_sys_rw_content_t '/ | ||
+ | </ | ||
+ | |||
+ | S' | ||
+ | |||
+ | < | ||
+ | restorecon -Rv / | ||
+ | </ | ||
+ | |||
+ | ===== Configuration du vhost ===== | ||
+ | |||
+ | Fichier / | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | SSLEngine on | ||
+ | |||
+ | DocumentRoot / | ||
+ | ErrorLog / | ||
+ | CustomLog / | ||
+ | ServerName cloud.nextcloud.lan | ||
+ | SSLCertificateFile / | ||
+ | SSLCACertificateFile / | ||
+ | SSLCertificateKeyFile / | ||
+ | < | ||
+ | Options +FollowSymlinks | ||
+ | AllowOverride All | ||
+ | < | ||
+ | Dav off | ||
+ | </ | ||
+ | SetEnv HOME / | ||
+ | SetEnv HTTP_HOME / | ||
+ | </ | ||
+ | < | ||
+ | #Header always set Strict-Transport-Security " | ||
+ | #Header set Referrer-Policy " | ||
+ | #Header set X-Content-Type-Options " | ||
+ | #Header always set X-Frame-Options " | ||
+ | #Header always set Feature-Policy " | ||
+ | #Header set Content-Security-Policy " | ||
+ | #Header set Content-Security-Policy: | ||
+ | #Header set Content-Security-Policy: | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Redirection des pages php vers les FPM (à intégrer à la conf vhost peut-être), | ||
+ | |||
+ | < | ||
+ | <Files " | ||
+ | Require all denied | ||
+ | </ | ||
+ | |||
+ | AddType text/html .php | ||
+ | |||
+ | DirectoryIndex index.php | ||
+ | |||
+ | SetEnvIfNoCase ^Authorization$ " | ||
+ | |||
+ | < | ||
+ | SetHandler " | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Ensuite, voir éventuellement la configuration de [[: | ||