├── test ├── shared │ ├── config │ │ └── env │ └── storage │ │ └── tmp ├── .gitignore └── deploy-cache │ └── test-deploy-file.txt ├── .gitignore ├── bin └── deploy ├── composer.lock ├── composer.json ├── templates ├── htaccess-auth.txt └── htaccess.txt ├── README.md └── atomic-deploy.php /test/shared/config/env: -------------------------------------------------------------------------------- 1 | key=value 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | .DS_Store 3 | /.idea -------------------------------------------------------------------------------- /test/shared/storage/tmp: -------------------------------------------------------------------------------- 1 | this is a test file 2 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | 4 | !deploy-cache 5 | !shared 6 | -------------------------------------------------------------------------------- /bin/deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 5 | RewriteEngine On 6 | 7 | # This sets the environment variable HTTPS to "on" 8 | # if the request is behind a load balancer which terminates SSL. 9 | # In PHP, you can access this via $_SERVER['HTTPS'] 10 | SetEnvIf X-Forwarded-Proto https HTTPS=on 11 | 12 | # Force redirect to HTTPS 13 | # Uncomment the rules below to enable. If hosting on Cloudways, these rules do not need to be enabled: https://support.cloudways.com/redirect-http-to-https/ 14 | # RewriteCond %{HTTPS} off 15 | # RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC] 16 | # RewriteCond %{HTTP_HOST} ^www.example.com [NC,OR] 17 | # RewriteCond %{HTTP_HOST} ^.+\.oneis.us [NC] 18 | # RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 19 | 20 | # Redirect non-www to www 21 | # Uncomment the rules below to enable 22 | # RewriteCond %{HTTP_HOST} ^example.com [NC] 23 | # RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301,NC] 24 | 25 | # Strip trailing slashes from the end of URLs. Redirect them to non-slash versions. 26 | # This ignores the trailing slash on the base URL (e.g. https://www.example.com/) 27 | RewriteCond %{REQUEST_URI} ^.+\/$ 28 | RewriteRule ^(.+)\/$ /$1 [L,R=301,NC] 29 | 30 | # Blitz cache rewrite 31 | # https://putyourlightson.com/craft-plugins/blitz/docs#/?id=server-rewrites 32 | RewriteCond %{DOCUMENT_ROOT}/cache/blitz/%{HTTP_HOST}/%{REQUEST_URI}/%{QUERY_STRING}/index.html -s 33 | RewriteCond %{REQUEST_METHOD} GET 34 | # Required as of version 2.1.0 35 | RewriteCond %{QUERY_STRING} !token= [NC] 36 | RewriteRule .* /cache/blitz/%{HTTP_HOST}/%{REQUEST_URI}/%{QUERY_STRING}/index.html [L] 37 | 38 | # Send would-be 404 requests to Craft 39 | RewriteCond %{REQUEST_FILENAME} !-f 40 | RewriteCond %{REQUEST_FILENAME} !-d 41 | RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC] 42 | RewriteRule (.+) index.php?p=$1 [QSA,L] 43 | 44 | 45 | # ---------------------------------------------------------------------- 46 | # Security headers 47 | # ---------------------------------------------------------------------- 48 | 49 | 50 | # Stop pages from loading when they detect XSS attacks 51 | Header set X-XSS-Protection "1; mode=block" 52 | 53 | # Disable the ablity to render a page on this website in a '', '