卒園式の写真をシェアした2日後にアレしてしまったのでよっしゃやり直すぞウワァァァという心境でした。V4になって色々変わっておられました。
Lychee 4.4.0 and later:
PHP >= 8.0 with these PHP extensions:
- BCMath
- Ctype
- Exif
- Ffmpeg (optional — to generate video thumbnails)
- Fileinfo
- GD
- Imagick (optional — to generate better thumbnails)
- JSON
- Mbstring
- OpenSSL
- PDO
- Tokenizer
- XML
- ZIP
これらをシュババババとインストールします(実際はとても遅いです)。
composer
composerが初耳だったせいか仲良くなれなかったので、公式に教えてもらいました。
そしてrootで実行してはいけないらしい。らしい。
nginx
.confです。
server {
listen 80;
server_name <mydomain>.<tld>;
##### Path to the Lychee public/ directory.
root /var/www/Lychee/public/;
# If the request is not for a valid file (image, js, css, etc.), send to bootstrap
if (!-e $request_filename)
{
rewrite ^/(.*)$ /index.php?/$1 last;
break;
}
# Serve /index.php through PHP
location = /index.php {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
# Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_param HTTP_PROXY "";
######### Make sure this is the correct socket for your system
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "post_max_size=100M
max_execution_time=200
upload_max_filesize=30M
memory_limit=300M";
fastcgi_param PATH /usr/local/bin:/usr/bin:/bin;
include fastcgi_params;
}
# Deny access to other .php files, rather than exposing their contents
location ~ [^/]\.php(/|$) {
return 403;
}
# [Optional] Lychee-specific logs
error_log /var/log/nginx/lychee.error.log;
access_log /var/log/nginx/lychee.access.log;
# [Optional] Remove trailing slashes from requests (prevents SEO duplicate content issues)
rewrite ^/(.+)/$ /$1 permanent;
}
ルートディレクトリが Lychee/public になりました。Lycheeにすると403で怒られます。ました。
- location = /index.php → location ~\.php$
- fastcgi_pass unix:/run/php/php8.1-fpm.sock → /var/run/以下略
ここを訂正したことだけは覚えていますが他はようわかりません。スマートフォンのスワイプがめんどくさいぞ問題は
Lychee/database/migrations/2020_07_26_085322_config_swipe_tolerance.php
ここの数値を書き換えたら解決しました。やったぜ。
あとはphp.iniやnginx.confをすこし書き換えてファイルのアップロード制限に引っかからないようにしました。動画?そんなものは心の目に焼き付けておいてください(誰からも求められませんでした)。
.env
mysqlとかユーザー名とかデータベース名とか適当に加えて終わりました。