[fix] Typo

This commit is contained in:
ljf 2021-06-10 18:10:25 +02:00
parent 5910e82dfa
commit f971035c04
3 changed files with 2 additions and 88 deletions

View file

@ -5,6 +5,8 @@ taxonomy:
category: docs category: docs
routes: routes:
default: '/external_storage' default: '/external_storage'
aliases:
- '/moving_app_folder'
--- ---
## Introduction ## Introduction

View file

@ -1,43 +0,0 @@
---
title: Déplacer un dossier d'application vers un autre espace de stockage
template: docs
taxonomy:
category: docs
routes:
default: '/moving_app_folder'
---
Les dossiers d'application se trouvent (*habituellement*) dans `/var/www/$nom_application`
Lorsqu'un dossier d'application devient trop volumineux il peut être intéressant de le déplacer vers un autre espace de stockage (comme un disque dur externe, une carte sd, etc.)
Partant du principe que [le stockage externe est déjà monté](/external_storage), voici un guide pour déplacer le dossier de l'application wordpress :
#### 1. Déplacer le dossier wordpress et tout son contenu vers le stockage externe
```shell
mv /var/www/wordpress /media/externalharddrive/
```
___
#### 2. Créer un lien symbolique
Le programme qui va chercher des informations dans le dossier /var/www/wordpress sera redirigé vers le stockage externe.
```shell
ln -s /media/externalharddrive/wordpress /var/www/wordpress
```
___
#### 3. (peut être) bidouiller les permissions
Après tout ça, il est possible que vous ayez à modifier les permissions de `/media/externalharddrive` pour que `www-data` (ou l'utilisateur de l'app) puisse y accéder. Quelque chose comme :
```shell
chgrp www-data /media/externalharddrive
chmod g+rx /media/externalharddrive
```
(À préciser par un expert)

View file

@ -1,45 +0,0 @@
---
title: Moving an app folder to a different storage
template: docs
taxonomy:
category: docs
routes:
default: '/moving_app_folder'
---
Applications folder are (*usually*) located in `/var/www/$appname`
If an application folder is expected to get bigger because of the amount of data it contains, it might be relevant to move it to another storage (like an external hard drive).
Here's a summary of how to do this the application wordpress. Here, is is assumed that
[you already mounted the external hard-drive](/external_storage).
#### 1. Move the entire wordpress folder to an external hard drive
```shell
mv /var/www/wordpress /media/externalharddrive/
```
#### 2. Create a symbolic link
So that programs looking for files in /var/www/wordpress will actually take them from the harddrive
```shell
ln -s /media/externalharddrive/wordpress /var/www/wordpress
```
#### 3. Tweak permissions (maybe?)
After this, note that you may need to tweak the permissions of `/media/externalharddrive` so that `www-data` (or the user corresponding to the app) is able to read through the folder... Something like :
```shell
chgrp www-data /media/externalharddrive
chmod g+rx /media/externalharddrive
```
(but it depends on your exact setup... Please update this doc page if you figure
out what to do exactly)
!!! If you want to do it with *NextCloud*, see [this Tutorial](/app_nextcloud).