First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Within the terminal, Fire this command:
which php
<?php | |
/** | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |
I use the first | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 |
...
"require": {
"vendor/package": "1.3.2", // exactly 1.3.2 (exact)
// >, <, >=, <= | specify upper / lower bounds
"vendor/package": ">=1.3.2", // anything above or equal to 1.3.2
"vendor/package": "<1.3.2", // anything below 1.3.2
// * | wildcard
Steps to the Beanstalk
Create Beanstalk instance in AWS (make sure to select correct security group and VPN)
Create Database instance on RDS (with appropriate user)
Connect Repo to Deploybot, and Add a new Server. Select Elastic Beanstalk (NOT Amazon Web Services)
Select the appropriate dropdowns for your new beanstalk
Add Environment File, enter database details for RDS (as before)
Create a directory in the root of your project called .ebextensions
Create (YAML) files in that directory that match:
Documentation on how to override or extend the default nginx config on Elastic Beanstalk running om Amazon Linux 2. Correct as of 2021-08-01. Also see the general documentation on how to extend linux servers.
All references to placing files refer to putting a file at this location in your application bundle. You should never modify a file directly at your Elastic Beanstalk server by ssh:ing to the server, since such a change will be wiped whenever your servers autoscale or if you rebuild your application completely.
The easiest extension is to add a new location block to the main server block. This can be done by placing a .conf
file with a server block in the folder .platform/nginx/conf.d/elasticbeanstalk
. Any such file is automatically included in the main server block.