Home » Custom AWS Nginx & PHP Elastic Beanstalk Platform for Enhanced Performance and Scalability

Custom AWS Nginx & PHP Elastic Beanstalk Platform for Enhanced Performance and Scalability

by Andrei Neacsu
4 minutes read
Custom Nginx & PHP AWS Elastic Beanstalk Platform

Our team has developed a custom platform for AWS Elastic Beanstalk, designed to improve performance, scalability, and flexibility for modern web applications. This whitepaper details the technical aspects of our custom platform, which incorporates nginx, PHP 7.1, PHP-FPM, Google PageSpeed plugin, and PHP-FPM caching on Amazon Linux.

The Challenge: AWS Elastic Beanstalk with nginx and PHP

Configuring nginx, PHP 7.1, PHP-FPM, Google PageSpeed plugin, and PHP-FPM caching on AWS Elastic Beanstalk can be complex and time-consuming. The default AWS Elastic Beanstalk PHP platform only supports Apache, necessitating a custom solution.

The Solution: Custom AWS Elastic Beanstalk Platform

We have created a custom AWS Elastic Beanstalk platform tailored to efficiently run nginx and PHP, allowing for greater customization and control over the software stack and system configurations. The custom platform’s scripts are available on our Github account.

Your Path to Innovation Starts with Digital Transformation

Customized Digital Strategies for Competitive Advantage

Explore Digital Transformation

Key Components of the Custom Platform

Our custom AWS Elastic Beanstalk platform includes:

  1. nginx 1.12.1
  2. PHP 7.1 with various modules
  3. PHP-FPM 7.1
  4. Google PageSpeed nginx plugin
  5. PHP-FPM caching
  6. nginx GZIP compression

Optimizations and Considerations

When using our custom AWS Elastic Beanstalk platform, consider the following:

  1. Both PHP-FPM and Google PageSpeed plugin caches are cleared upon app deployment or server restart.
  2. Adjust PHP-FPM parameters based on your EC2 instance type (pm, pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers).
  3. The PHP memory limit is set to 512M.
  4. Log rotation is enabled for both nginx and PHP-FPM logs.
  5. Health checks for nginx and PHP-FPM are functional.
  6. Cron service restarts upon app deployment.
See also
Optimizing Video Content Distribution in Web and Mobile Applications with AWS Elemental MediaConvert

Ongoing Development and Support

Accelerate Your Projects with Our Development Teams

Enhance Your Outcomes with Committed Software Development Teams

Get Your Development Team

We will continue to update and enhance our custom AWS Elastic Beanstalk platform, releasing modifications via Github. For any questions or assistance, please feel free to contact us. Our team is dedicated to helping you optimize your web applications’ performance and scalability.

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 233

No votes so far! Be the first to rate this post.

Related Posts