TODO: Write a project description
TODO: Describe the installation process
| <Directory "/var/www/html/public/"> | |
| DirectoryIndex index.php index.html index.htm | |
| ErrorDocument 404 index.php | |
| Options Indexes FollowSymLinks MultiViews | |
| AllowOverride All | |
| AuthType Basic | |
| AuthName "My Protected Area" | |
| AuthUserFile /path/to/authfile/.htpasswd | |
| SetEnvIF X-Forwarded-For "0.0.0.0" AllowIP #change 0.0.0.0 to your whitelisted ip | |
| <RequireAny> |
| <?php | |
| $instanceId = file_get_contents('http://169.254.169.254/latest/meta-data/instance-id'); | |
| //I'd prefer to use the SDK here | |
| exec('aws ec2 describe-instances --filters "Name=instance-id,Values='.$instanceId.'"',$results); | |
| $instances = json_decode(implode(PHP_EOL,$results),true); | |
| //fingers crossed | |
| $tags = $instances['Reservations'][0]['Instances'][0]['Tags']; |
| version: "3" | |
| services: | |
| web: | |
| image: flipbox/php:71-amazonlinux-apache | |
| ports: | |
| - 80:80 | |
| #I have a self signed cert for local dev work | |
| - 443:443 | |
| volumes: | |
| - .:/var/www/html |
| # REPOs | |
| # https://hub.docker.com/r/flipbox/php/ | |
| version: "3" | |
| services: | |
| web: | |
| image: flipbox/php:72-fpm-alpine | |
| volumes: | |
| - .:/app/ | |
| # point to your fpm inis | |
| - ./general.ini:/usr/local/etc/php/conf.d/general.ini |
| #waiting for craftcms v3! | |
| while true; do composer update; done |
| composer require flipboxfactory/saml-sp |
| -- Reference: https://stackoverflow.com/questions/36647058/removing-duplicates-with-unique-index | |
| ALTER IGNORE TABLE mytable ADD UNIQUE INDEX myindex (A, B, C, D); |
| #!/bin/bash | |
| echo "AWSRegionToAMI:" | |
| for region in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text) | |
| do | |
| echo " ${region}:"; | |
| AMI=$(aws ssm get-parameters --names /aws/service/ecs/optimized-ami/amazon-linux/recommended --region $region | jq -r '.Parameters[0].Value | fromjson | .image_id') | |
| printf " AMI: %s \n" $AMI | |
| done |
| #!/bin/bash | |
| grep -B 3 -A 10 -n '\[error\]' storage/logs/web.log |