... | ... | @@ -77,4 +77,126 @@ Compiler avec yarn le js + css. |
|
|
|
|
|
yarn install --prod
|
|
|
yarn buildall
|
|
|
``` |
|
|
\ No newline at end of file |
|
|
```
|
|
|
Création répertoire
|
|
|
```
|
|
|
mkdir cache uploads
|
|
|
chown www-data:www-data cache uploads
|
|
|
chmod 700 cache uploads
|
|
|
```
|
|
|
# Base de données
|
|
|
```
|
|
|
# installation sécurisée de la bd
|
|
|
sudo mysql_secure_installation
|
|
|
notamment mot de passe sur compte root (mdp classique ispa utilisé)
|
|
|
```
|
|
|
# création de la base de données
|
|
|
```
|
|
|
mysql -uroot -p
|
|
|
create database elabftw character set utf8mb4 collate utf8mb4_general_ci;
|
|
|
grant usage on *.* to elabftw@localhost identified by 'test_elab_canular';
|
|
|
```
|
|
|
|
|
|
#Paramétrer le serveur web
|
|
|
Choix de Apache2
|
|
|
|
|
|
```
|
|
|
#création du 001-canular.conf dans /etc/apache2/sites-avalaible
|
|
|
<VirtualHost *:80>
|
|
|
ServerName canular.inrae.fr
|
|
|
ServerAdmin webmaster@localhost
|
|
|
DocumentRoot /var/www/html/elabftw/web
|
|
|
<Directory />
|
|
|
Require all denied
|
|
|
Options -Indexes -Includes -ExecCGI -FollowSymlinks
|
|
|
</Directory>
|
|
|
|
|
|
<Directory /var/www/elabftw/web>
|
|
|
Require all granted
|
|
|
Options -Indexes -Includes -ExecCGI +FollowSymlinks
|
|
|
</Directory>
|
|
|
|
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
|
|
|
|
RewriteEngine on
|
|
|
RewriteCond %{SERVER_NAME} =canular.inrae.fr
|
|
|
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
|
|
</VirtualHost>
|
|
|
|
|
|
```
|
|
|
Elab fonctionne en https seulement, besoin d'un certificat
|
|
|
|
|
|
```
|
|
|
apt install certbot
|
|
|
apt install python3-certbot-apache
|
|
|
certbot --apache -d canular.inrae.fr --post-hook "/usr/sbin/service apache2 restart"
|
|
|
|
|
|
# si tout se passe bien
|
|
|
- Congratulations! Your certificate and chain have been saved at:
|
|
|
/etc/letsencrypt/live/canular.inrae.fr/fullchain.pem
|
|
|
Your key file has been saved at:
|
|
|
/etc/letsencrypt/live/canular.inrae.fr/privkey.pem
|
|
|
Your cert will expire on 2022-01-31. To obtain a new or tweaked
|
|
|
version of this certificate in the future, simply run certbot again
|
|
|
with the "certonly" option. To non-interactively renew *all* of
|
|
|
your certificates, run "certbot renew"
|
|
|
- Your account credentials have been saved in your Certbot
|
|
|
configuration directory at /etc/letsencrypt. You should make a
|
|
|
secure backup of this folder now. This configuration directory will
|
|
|
also contain certificates and private keys obtained by Certbot so
|
|
|
making regular backups of this folder is ideal.
|
|
|
- If you like Certbot, please consider supporting our work by:
|
|
|
|
|
|
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
|
|
|
Donating to EFF: https://eff.org/donate-le
|
|
|
|
|
|
|
|
|
```
|
|
|
Génère automatiquement le fichier 001.canular-le-ssl.conf
|
|
|
```
|
|
|
<IfModule mod_ssl.c>
|
|
|
<VirtualHost *:443>
|
|
|
ServerName canular.inrae.fr
|
|
|
ServerAdmin webmaster@localhost
|
|
|
DocumentRoot /var/www/html/elabftw/web
|
|
|
|
|
|
<Directory />
|
|
|
Require all denied
|
|
|
Options -Indexes -Includes -ExecCGI -FollowSymlinks
|
|
|
</Directory>
|
|
|
|
|
|
<Directory /var/www/elabftw/web>
|
|
|
Require all granted
|
|
|
Options -Indexes -Includes -ExecCGI +FollowSymlinks
|
|
|
</Directory>
|
|
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
|
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
|
|
SSLCertificateFile /etc/letsencrypt/live/canular.inrae.fr/fullchain.pem
|
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/canular.inrae.fr/privkey.pem
|
|
|
Include /etc/letsencrypt/options-ssl-apache.conf
|
|
|
</VirtualHost>
|
|
|
</IfModule>
|
|
|
```
|
|
|
|
|
|
test si ça fonctionne ici : http://canular.inrae.fr/elabftw
|
|
|
|
|
|
Erreur possible si plusieurs versions de php
|
|
|
désactiver celles antérieures à la 8
|
|
|
```
|
|
|
a2dismod php7.3
|
|
|
a2enmod php8.0
|
|
|
service apache2 restart
|
|
|
```
|
|
|
|
|
|
test si ça fonctionne ici : http://canular.inrae.fr/elabftw
|
|
|
si on arrive sur la page login.php et que ça ressemble à ça :
|
|
|
|
|
|
![image](uploads/d45defe0f3bb13f0b581364f4291fb88/image.png)
|
|
|
|
|
|
on est bon !
|
|
|
|
|
|
# création du compte admin :
|
|
|
|
|
|
https://canular.inrae.fr/register.php
|
|
|
|