|
@@ -86,14 +86,14 @@ sudo su
|
|
export pu="anton"
|
|
export pu="anton"
|
|
|
|
|
|
# working directory (for easy future maintenance)
|
|
# working directory (for easy future maintenance)
|
|
-export wd="/var/www/dox.installanduse.com"
|
|
|
|
-mkdir -p ${wd}
|
|
|
|
|
|
+export wsd="/var/www/dox.installanduse.com"
|
|
|
|
+mkdir -p ${wsd}
|
|
# permit priviledged user to own app directory
|
|
# permit priviledged user to own app directory
|
|
-chown -R ${pu}:${pu} ${wd}
|
|
|
|
|
|
+chown -R ${pu}:${pu} ${wsd}
|
|
exit
|
|
exit
|
|
# as priviledged user, not as root
|
|
# as priviledged user, not as root
|
|
-export wd="/var/www/dox.installanduse.com"
|
|
|
|
-cd ${wd}
|
|
|
|
|
|
+export wsd="/var/www/dox.installanduse.com"
|
|
|
|
+cd ${wsd}
|
|
```
|
|
```
|
|
|
|
|
|
clone latest application source code from repo
|
|
clone latest application source code from repo
|
|
@@ -116,7 +116,7 @@ sudo mv composer.phar /usr/local/bin/composer
|
|
|
|
|
|
- build (composer install)
|
|
- build (composer install)
|
|
```bash
|
|
```bash
|
|
-cd ${wd}/BookStack
|
|
|
|
|
|
+cd ${wsd}/BookStack
|
|
which composer
|
|
which composer
|
|
composer install --no-dev
|
|
composer install --no-dev
|
|
```
|
|
```
|
|
@@ -124,16 +124,16 @@ composer install --no-dev
|
|
Set least necessary permissions for webserver
|
|
Set least necessary permissions for webserver
|
|
```bash
|
|
```bash
|
|
sudo su
|
|
sudo su
|
|
-export wd="/var/www/dox.installanduse.com"
|
|
|
|
|
|
+export wsd="/var/www/dox.installanduse.com"
|
|
# webserver's user
|
|
# webserver's user
|
|
export wsu="www-data"
|
|
export wsu="www-data"
|
|
-chown -R ${wsu}:${wsu} ${wd}/BookStack/storage/
|
|
|
|
-chmod -R 775 ${wd}/BookStack/storage/
|
|
|
|
-chown -R ${wsu}:${wsu} ${wd}/BookStack/bootstrap/cache/
|
|
|
|
-chmod -R 775 ${wd}/BookStack/bootstrap/cache/
|
|
|
|
-chown -R ${wsu}:${wsu} ${wd}/BookStack/public/uploads/
|
|
|
|
-chmod -R 775 ${wd}/BookStack/public/uploads/
|
|
|
|
-chown -R ${wsu}:${wsu} ${wd}/BookStack/public/
|
|
|
|
|
|
+chown -R ${wsu}:${wsu} ${wsd}/BookStack/storage/
|
|
|
|
+chmod -R 775 ${wsd}/BookStack/storage/
|
|
|
|
+chown -R ${wsu}:${wsu} ${wsd}/BookStack/bootstrap/cache/
|
|
|
|
+chmod -R 775 ${wsd}/BookStack/bootstrap/cache/
|
|
|
|
+chown -R ${wsu}:${wsu} ${wsd}/BookStack/public/uploads/
|
|
|
|
+chmod -R 775 ${wsd}/BookStack/public/uploads/
|
|
|
|
+chown -R ${wsu}:${wsu} ${wsd}/BookStack/public/
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
@@ -218,7 +218,7 @@ To summarize own findings, we shall use:
|
|
```bash
|
|
```bash
|
|
sudo su
|
|
sudo su
|
|
# copy output of root path
|
|
# copy output of root path
|
|
-echo ${wd}/BookStack/public
|
|
|
|
|
|
+echo ${wsd}/BookStack/public
|
|
cd /etc/nginx/sites-available
|
|
cd /etc/nginx/sites-available
|
|
vi dox.installanduse.com.conf
|
|
vi dox.installanduse.com.conf
|
|
```
|
|
```
|
|
@@ -267,7 +267,7 @@ ss -ntap | grep nginx
|
|
exit
|
|
exit
|
|
id
|
|
id
|
|
export wd="/var/www/dox.installanduse.com"
|
|
export wd="/var/www/dox.installanduse.com"
|
|
-cd ${wd}/BookStack
|
|
|
|
|
|
+cd ${wsd}/BookStack
|
|
php artisan migrate
|
|
php artisan migrate
|
|
```
|
|
```
|
|
|
|
|
|
@@ -367,8 +367,8 @@ systemctl restart nginx
|
|
|
|
|
|
Application should be up and running, open local browser
|
|
Application should be up and running, open local browser
|
|
```bash
|
|
```bash
|
|
- open -a firefox https://dox.installanduse.com/
|
|
|
|
- ```
|
|
|
|
|
|
+open -a firefox https://dox.installanduse.com/
|
|
|
|
+```
|
|
|
|
|
|
Login with default credentials:
|
|
Login with default credentials:
|
|
```
|
|
```
|
|
@@ -407,15 +407,22 @@ vi .env
|
|
FILE_UPLOAD_SIZE_LIMIT=50
|
|
FILE_UPLOAD_SIZE_LIMIT=50
|
|
```
|
|
```
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
- S3 driver to mount storage in Cloud Bucket
|
|
- S3 driver to mount storage in Cloud Bucket
|
|
- fine-tune (nginx.conf)
|
|
- fine-tune (nginx.conf)
|
|
|
|
+```bash
|
|
|
|
+vi /etc/nginx/nginx.conf
|
|
|
|
+```
|
|
```ini
|
|
```ini
|
|
|
|
+[...]
|
|
http {
|
|
http {
|
|
#...
|
|
#...
|
|
client_max_body_size 100m;
|
|
client_max_body_size 100m;
|
|
client_body_timeout 120s; # Default is 60, May need to be increased for very large uploads
|
|
client_body_timeout 120s; # Default is 60, May need to be increased for very large uploads
|
|
#...
|
|
#...
|
|
}
|
|
}
|
|
|
|
+[...]
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
@@ -438,4 +445,30 @@ memory_limit = 256M
|
|
ref.
|
|
ref.
|
|
https://www.bookstackapp.com/docs/admin/installation/#requirements
|
|
https://www.bookstackapp.com/docs/admin/installation/#requirements
|
|
https://www.bookstackapp.com/docs/admin/upload-config/#s3
|
|
https://www.bookstackapp.com/docs/admin/upload-config/#s3
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+more notes on location os filesizes for upload
|
|
|
|
+```bash
|
|
|
|
+
|
|
|
|
+[08:23:12 Sat Nov 30] @gcp1mx1 /home/dox_2dz_fi-bookstack/storage/logs# fgrep -irn post_max_size /etc/php
|
|
|
|
+/etc/php/8.2/apache2/php.ini:703:post_max_size = 8M
|
|
|
|
+/etc/php/8.2/cli/php.ini:703:post_max_size = 8M
|
|
|
|
+/etc/php/8.2/fpm/php.ini:703:post_max_size = 8M
|
|
|
|
+vi /etc/php/8.2/apache2/php.ini
|
|
|
|
+vi /etc/php/8.2/fpm/php.ini
|
|
|
|
+vi /etc/php/8.2/cli/php.ini
|
|
|
|
+
|
|
|
|
+[08:23:48 Sat Nov 30] @gcp1mx1 /home/dox_2dz_fi-bookstack/storage/logs# fgrep -irn upload_max_filesize /etc/php
|
|
|
|
+/etc/php/8.2/apache2/php.ini:855:upload_max_filesize = 2M
|
|
|
|
+/etc/php/8.2/cli/php.ini:855:upload_max_filesize = 2M
|
|
|
|
+/etc/php/8.2/fpm/php.ini:855:upload_max_filesize = 2M
|
|
|
|
+vi /etc/php/8.2/apache2/php.ini
|
|
|
|
+vi /etc/php/8.2/cli/php.ini
|
|
|
|
+vi /etc/php/8.2/fpm/php.ini
|
|
|
|
+
|
|
|
|
+systemctl | grep fpm
|
|
|
|
+systemctl restart php8.2-fpm.service
|
|
|
|
+systemctl restart nginx
|
|
|
|
+
|
|
```
|
|
```
|