This guide builds a set of .htaccess
rules that are appropriate for common ACSF use cases and RCAB requirements.
1 - Default .htaccess
2 - ACSF requirement
3 — Force HTTP to HTTPS
# | |
# Apache/PHP/Drupal settings: | |
# | |
# Protect files and directories from prying eyes. | |
<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$"> | |
<IfModule mod_authz_core.c> | |
Require all denied | |
</IfModule> | |
<IfModule !mod_authz_core.c> |
# From factory-hooks/post-settings-php/search-api-solr.php | |
<?php | |
/** | |
* @file | |
* | |
* Used to configure the most appropriate core depending on the environment | |
* currently in use. Site Factory and the Acquia Connector module vary |
Allow about one hour to follow this tutorial and become familiar with BLT. To save time, create the Acquia Cloud Free environment before you start the tutorial.
This tutorial assumes you are on a Mac, but I also wrote a quick start for Drupal and BLT on Windows 10.
Cloudflare adds the CF-IPCountry header to all incoming requests, other CDNs may have something similar.
You can the headers incoming in balancer traffic:
[12:25:19] [email protected]:/home/markfelton# varnishlog | grep CF-IPCountry
- ReqHeader CF-IPCountry: JP
- ReqHeader CF-IPCountry: JP
This is a work-in-progress notes stream of links that may be helpful for new Windows users, or macOS to Windows converters.
CFCLI is available on Docker Hub. You will need to login with your Docker ID and password. The README is on GitHub.
You can use Docker to run a variety of apps like CFCLI, or develop PHP code in a local virtual machine.
If you already have Docker, update to the latest version. Otherwise, begin this tutorial by installing Docker for Windows or Mac.
PHP_CodeSniffer detects violations of a defined set of coding standards.
You can use it to prepare for PHP version upgrades. There is a set of sniffs that checks for PHP cross-version compatibility which allows you to analyze your code for compatibility with higher and lower versions of PHP.
To check your Drupal codebase, first clone it into a clean directory, and check out the correct branch (e.g. git checkout develop
).
Docker enables fast local environments. Tokaido gets you quickly up and running.
If you already have Docker, update to the latest version, otherwise, download Docker from https://docs.docker.com/docker-for-mac/install. You will need to login with your Docker ID and password.
Docker enables fast local environments. DDEV simplifies the use of Docker for PHP projects. With your project configuration can shared with others on the team and version-controlled for consistency and easier maintenance.
If you already have Docker, update to the latest version, otherwise, download Docker from https://docs.docker.com/docker-for-mac/install. You will need to login with your Docker ID and password.
Install Docker to your Applications folder as with any other app (perhaps add it to your macOS Dock as well).