This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Make sure httpd.conf has DocumentRoot pointing to /public/ directory | |
| # and that access to the default document root has directive AllowOverride set to All | |
| cat >/var/www/html/.htaccess <<EOL | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteRule ^(.*)$ public/$1 [L] | |
| </IfModule> | |
| EOL | |
| cat /var/www/html/.htaccess |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Page Needs --> | |
| <meta charset="utf-8" /> | |
| <title></title> | |
| <meta name="author" content="" /> | |
| <meta name="description" content="" /> | |
| <!-- Open Graph --> | |
| <meta property="og:title" content="" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # I assume you already have port 443 open and ready to receive requests on your AWS security policies | |
| # As well, I also assume you already have a valid domain pointing to your AWS EC2 instance, since Let's Encrypt does not verify EC2 instances without a domain name | |
| YOUR_DOMAIN=xyz.com | |
| YOUR_SERVER=apache | |
| sudo yum update # Update your AMI dependencies | |
| sudo yum install git, mod24_ssl, gcc | |
| sudo pip install --upgrade pip # Upgrade your pip | |
| cd /opt/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo yum update -y | |
| sudo yum install -y httpd24 php70 php70-mbstring mysql56-server php70-mysqlnd | |
| sudo service httpd start | |
| sudo chkconfig httpd on | |
| # Check security group allowing http incoming connections - Apache test page should be visible | |
| # Setup www group and future permissions | |
| sudo groupadd www | |
| sudo usermod -a -G www ec2-user | |
| sudo usermod -a -G www apache |