It's almost Theme Time, but before we begin with the fun stuff, there are a few server items that need to be set up. Outbound email is the hardest piece, so we're going to get help from AI and we'll put the notes here to share.
PHP versions -
// php8.1 is already the newest version (8.1.27-4+ubuntu22.04.1+deb.sury.org+1)
WARNING: add-apt-repository is broken with non-UTF-8 locales, see
https://github.com/oerdnj/deb.sury.org/issues/56 for workaround:
# LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
Current Drupal PHP Requirements
Setup Notes:
Credits: php.watch php-8.3-install-upgrade-on-debian-ubuntu
// apt install php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl}
// apt install --reinstall libapache2-mod-
// apt install php8.3-mysql
// apt install php8.3-xml
// apt install php8.3-gd
// apt install imagemagick php8.3-imagick
ImageEmail - MX,SPF, DKIM, DMARC, Postfix SMTP
ImageDKIM passing test validation with Gmail.
ImageFile Security
Media embed for CKE Install Readme (https://www.drupal.org)
Ckeditor Media Embed Issues/3393693
Patch for Media Embed Error:
"There are no commands defined in the "ckeditor_media_embed" namespace."
Additional notes on setting up the Text Editor Experience for Content Editors: Gluebox.com Text Editor Review Notes.
Image
- Backups: design/backup_script
- Logging
Tripwires
fail2ban
Alias /nice_try /usr/share/phpmyadminImageSetting Site Name using Apache Variable:
Because we're on Apache, we can grab the inbound Domain Name above Drupal, at the Webserver. Apache Domain Name variables map to our Site Names in our Drupal settings.php file.
Pros
Apache Virtual Hosts (sites) keep Drupal organized by enforcing a "Site Variable" within Drupal.
Works well for small organizations with compartmentalized departments.
Cons
Hard to scale up beyond a small organization, must be managed in Apache config files.
Considerations
$domain_name = $_SERVER['DOMAIN_NAME'] ?? NULL; // Set the domain name default if DOMAIN_NAME is empty. if (empty($domain_name)) { $domain_name = "gluebox.com"; } putenv("DOMAIN_NAME=$domain_name"); $site_name = ''; switch ($domain_name) { case 'snowmaid.com': $site_name = 'SnowMaid'; break; case 'dangercactus.com': $site_name = 'Danger Cactus'; break; case 'gluebox.com': $site_name = 'GlueBox Technology'; break; case 'happyplant.lol': $site_name = 'Happy Plant LOL'; break; default: $site_name = 'GlueBox Technology'; break; }
Setting up recipes with Drupal 10.x-dev https://git.drupalcode.org/project/distributions_recipes/-/blob/1.0.x/docs/getting_started.md
Robots.txt Note
Stopping Robot Crawlers from ingesting too much, or causing chaos with pager links.
# Pager links
Disallow: /*?page=
Disallow: /*&page=
New Stuff for Drupal 10.x / 11.x
Same Page Preview, coming to Drupal Core (?)
https://www.drupal.org/project/same_page_preview
Nice Recipe to Study:
https://gitlab.com/kevinquillen/drupal-base/-/blob/1.0.x/recipe.yml?ref_type=heads