In this whitepaper, we explore the process of creating a custom AWS Elastic Beanstalk platform for Ubuntu 16.04, Apache2, and PHP 7.0. This configuration is particularly beneficial for PHP websites requiring CURL to be compiled with OpenSSL, as Amazon Linux comes with an NSS compiled CURL. This custom platform can also be configured for use with Nginx. If you need assistance, please feel free to contact us.
The Challenge: Configuring an Apache2, PHP 7.0, and Ubuntu 16.04 custom platform for AWS Elastic Beanstalk.
The Solution: We successfully created and deployed a custom AWS Elastic Beanstalk platform based on Ubuntu 16.04 and PHP. Custom EBS platforms enable us to modify the operating system, installed software, scripts, and other system configurations. The default AWS Elastic Beanstalk PHP platform includes Apache, PHP 7.0 or 7.1, but uses Amazon Linux as the operating system. In some cases, having an Ubuntu 16.04 environment on EBS is beneficial, so we configured a custom AWS EBS platform. You can find the custom platform’s scripts on our Github account here.
Custom Software Development for a Competitive Edge
Build Unique Software Solutions with Our Expertise
Explore Custom SoftwareBe cautious when selecting the Amazon Machine Image (AMI) for this custom platform, as it varies across regions. We used the ami-1b791862 AMI for this configuration and deployed it in the Ireland region.
This custom AWS Elastic Beanstalk Ubuntu 16.04 PHP platform includes:
- Apache2;
- PHP 7.0;
- Various PHP modules (refer to the 02-install-php.sh script for more details).
Consider the following points when using this custom AWS Elastic Beanstalk Ubuntu 16.04 PHP platform:
- The PHP memory limit is set to default;
- Log rotation is enabled for Apache2;
- Apache2 EBS health checks do NOT work;
- Environment-level configuration is NOT functional yet – we will update the article when it’s operational.
We will continue to update and refine this custom EBS platform, releasing modifications via Github.
Experience Expert IT Consultancy
Transformative Strategies for Your Technology Needs
Discover IT ConsultingFor more information or assistance, please feel free to contact us. We are happy to help.
If you are interested in configuring a custom AWS Elastic Beanstalk platform running Nginx, PHP 7.1, PHP-FPM, the Google PageSpeed plugin, and PHP-FPM caching on Amazon Linux, please refer to this article on our blog.