2021-03-15 17:40:05 +01:00
|
|
|
# php-chrooter
|
|
|
|
|
2021-03-15 18:03:29 +01:00
|
|
|
Use [chroot with PHP](https://www.php.net/manual/fr/function.chroot.php) anbd isolate your website.
|
|
|
|
|
2021-03-15 23:18:26 +01:00
|
|
|
## Configure
|
2021-03-15 18:03:29 +01:00
|
|
|
To use it, edit chroot.sh and edit 3 variables :
|
|
|
|
|
|
|
|
| Variable | Description |
|
|
|
|
| -------- | ----------- |
|
|
|
|
| CHROOTPATH | The path where this script store all files, bin, lib needed to chroot website (create this before) |
|
|
|
|
| ZONEINFO | The path where zoneinfo is stored. Find this with `find /usr -type d -name "zoneinfo"` |
|
2021-03-18 16:15:55 +01:00
|
|
|
| LISTCHROOTFILE | The list file who contain all chrooted directory |
|
2021-03-15 23:18:26 +01:00
|
|
|
|
|
|
|
## Use``
|
|
|
|
`bash chroot.sh --install` copy all dependencies and store it on CHROOTPATH.
|
|
|
|
`bash chroot.sh --upgrade` upgrade all dependencies in CHROOTPATH.
|
|
|
|
`bash chroot.sh --configure /my/website/path` add all dependencies in website folder mostly with hardlink.
|