Task: Get list of EC2 instances Id(s) by beanstalk environment name Solution: envname=”wp-env” for ec2Id in $(aws elasticbeanstalk describe-environment-resources –environment-name…
Task: Copy some file from container to local computer Solution: docker cp <container>:<path><filename.ext> <localpath> Example: docker cp nginx:/var/log/mylog.log . Done.
Task: add WAF service to WP site Implementation steps: Create WebACLAdd rulesets:AWS-AWSManagedRulesCommonRuleSetAWS-AWSManagedRulesWordPressRuleSetAWS-AWSManagedRulesSQLiRuleSetAWS-AWSManagedRulesPHPRuleSetAWS-AWSManagedRulesKnownBadInputsRuleSetDisable next rules in the AWS-AWSManagedRulesCommonRuleSet:SizeRestrictions_BODYGenericRFI_BODYCrossSiteScripting_BODYGenericRFI_QUERYARGUMENTSDone.