dev/2.drupal.md
2023-07-24 09:45:00 +03:00

758 B

Install

cd /var/www/html/
composer create-project drupal/recommended-project:^9 drupal4
cd drupal4

Configure

sed -i "s/^  # RewriteBase \/drupal/RewriteBase \/drupal4/" web/.htaccess
cp web/sites/default/default.settings.php web/sites/default/settings.php
echo "\$settings['trusted_host_patterns'] = ['^192.168.56.101\$'];" >> web/sites/default/settings.php

Filesystem

chmod 777 web/sites/default/settings.php
mkdir -m 777 web/sites/default/files
mkdir -m 777 web/sites/default/files/translations
chown apache:apache -R *
chown apache:apache web/.*

Use

Go to drupal installer at http://192.168.56.101/drupal4

After the installation restore the settings perms chmod 644 drupal4/web/sites/default/settings.php