DrupalCMS
Varbaseは、画像関係がちょっと面倒。
ImageMagick
インストールしておく
# dnf install ImageMagick ImageMagick-devel
Nginx Conf
これが曲者
/etc/nginx/conf.d/drupal.local.conf
server {
client_max_body_size 256M;
listen 80;
server_name varbase.local;
root /usr/share/nginx/html/drupal/cms/web;
index index.php index.html index.htm;
access_log /var/log/nginx/varbase_access.log;
error_log /var/log/nginx/varbase_error.log;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
location ~ ^/system/files/ {
try_files $uri /index.php?$query_string;
}
location @rewrite {
rewrite ^ /index.php;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires max;
log_not_found off;
try_files $uri @rewrite;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_read_timeout 300;
fastcgi_connect_timeout 300;
}
}
ファイルアクセス権
# chown -R nginx:nginx /usr/share/nginx
# chmod -R 755 /usr/share/nginx
# cd /usr/share/nginx/html/drupal/cms/web
# mkdir sites/default/files
# chmod a+w sites/default/files
# chmod a+w sites/default
# cp sites/default/default.settings.php sites/default/settings.php
# chmod a+w sites/default/settings.php
(略)
# cd /usr/share/nginx/html/drupal/cms/web
# chmod go-w sites/default/settings.php
# chmod go-w sites/default
エラーがわんさか
「Continue to the error page」のリンクが現れる。
クリックして続行。
2026/10/27現在、PHP 8.5と8.4で挙動が異なる。
WebformとPHP 8.5の組み合わせに難がある模様
PHP 8.5では、null を配列のキー(オフセット)として使用した場合の非推奨警告(Deprecations)が厳格化されました。WebformやDrupalコアのLayout Builderなどで、未入力の項目や空の要素を処理する際に大量の警告ログが出力されるケースが報告されています。
🔗記事