COG - LAMP

launch

The combination of Linux, Apache, MySQL, and PHP, commonly know as the LAMP stack, is a tried and true Web development environment that is extremely popular. Cloud Ops Group LAMP improves on that stack by offering NGINX instead of Apache, MariaDB instead of MySQL, the latest PHP, and the AWS CodeDeploy agent. Offering the latest technology for providing the latest in speed, reliability, and security.

COG - LAMP includes:

  • PHP 8.0 (default), PHP 7.4
  • NGINX/HTTP2 (with TLS)
  • MariaDB 10.5.9
  • AWS CodeDeploy

Running Simultaneous PHP servers

COG - LAMP can run multiple versions of PHP at the same time. By default, COG - LAMP to only runs the latest version.

php 7.4

Start manually:

sudo /etc/init.d/php-fpm-php7.4 start

Enable on boot up:

sudo rc-update add php-fpm-php7.4 default

php 8.0

Start manually:

sudo /etc/init.d/php-fpm-php8.0 start

Enable on boot up:

sudo rc-update add php-fpm-php8.0 default

nginx config

The "fastcgi_pass" directive in your nginx config(s) will need to know which version of PHP to execute. You can create separate configs for different virtual hosts, or even run both in the same virtual host:

  location ~ \.php$ {
    fastcgi_pass   unix:/run/php-fpm7.4.sock;
    ... other directives
  }

or for PHP 8:

  location ~ \.php$ {
    fastcgi_pass   unix:/run/php-fpm8.0.sock;
    ... other directives
  }

Support

For bug reports, feature requests, or general questions, please contact us.

Directions

  1. Launch AMI from the Amazon Marketplace
  2. Use SSH, sftp, or AWS CodeDeploy to upload content to /mnt/www.
  3. Open a Web browser and type the public DNS name provided by Amazon into the URL bar.

Configure local Email sending

COG images come with SSMTP (a send-only sendmail emulator) installed.

To configure SSMTP to send via Gmail, you will have to edit its configuration file and enter your account settings:

#### /etc/ssmtp/ssmtp.conf

## The user that gets all the mails (UID < 1000, usually the admin)
root=username@gmail.com

## The mail server (where the mail is sent to), both port 465 or 587 should be acceptable
## See also http://mail.google.com/support/bin/answer.py?answer=78799
mailhub=smtp.gmail.com:587

## The address where the mail appears to come from for user authentication.
rewriteDomain=gmail.com

## The full hostname
hostname=gmail.com

## Use SSL/TLS before starting negotiation
UseTLS=Yes
UseSTARTTLS=Yes

## Username/Password
AuthUser=username@gmail.com
AuthPass=password

## Email 'From header's can override the default domain?
FromLineOverride=yes