Free Nginx (LEMP) AMI – CentOS, Nginx, MySQL & PHP-FPM

7 Shares Google+ 7 Facebook 0 Twitter 0 LinkedIn 0 7 Shares ×

This Amazon EC2 AMI includes the latest Amazon Linux (Centos), Nginx 1.0.15, MySQL 5.1 & PHP 5.4 (PHP-FPM) custom installed and tuned for stability and speed.

top stats - Nginx AMI

Screen of top stats. This AMI is optimized for efficiency and runs fast even on t1.micro.

Leave questions & comments below. For free general support post your questions in the Linux forum: http://stacklinux.com/categories/linux-servers (I usually respond within 5 business days). If you need immediate support, or you don’t want to post your issue publicly, please contact me: http://it-admin.elance.com

To access my free Nginx AMI, go to…
aws.amazon.com/amis/nginx-lemp-web-server

Changelog:
v1.0.1 – 05/25/2013: Locked down root password with “sudo passwd -l root” as per Amazon’s advice.


 

7 Shares Google+ 7 Facebook 0 Twitter 0 LinkedIn 0 7 Shares ×
Free Nginx (LEMP) AMI – CentOS, Nginx, MySQL & PHP-FPM

12 Responses

  1. Hey Hayden,

    Messing around with learning AWS using their free tier. Came across your AMI, installed and have gotten access via SFTP and SSH. All groovy. Even got into MySQL and did some hardening there (once I subscribed to your list here and got the extra information that was revealed!)

    My question to you is I am unable to make changes to the nginx.conf file in order to set up a domain that I’m now pointing to the Elastic IP I’ve connected to the instance I’m running at AWS.

    Is there a setting somewhere I forgot to check or uncheck that will allow me to make changes to the nginx files?

    Thanks, in advance, for your time on this one.

    James.

    James Kirk May 10, 2013 at 12:57 am #
  2. Hi James,

    Thanks for your question. This will help me to create an FAQ in future.

    Did you already edit /usr/local/nginx/conf/nginx.conf using vi or nano ?

    …where you replace domain.com with your domain and also make sure you have the web files in /mnt/www/web01

    Out of the box even if you load the IP or AWS domain of the instance in a browser it will load index.php which includes php info.

    @hydnj May 10, 2013 at 1:07 am #
  3. Hi Hayden,

    Thank you so much for the AMI. I would like to install Magento on the instance. Everything is fine except that it needs pdo_mysql loaded. So I installed php-mysql by yum, but nothing changes for “php -m”. Wondering how can I load pdo_mysql. Thanks a lot!!

    Si

    Si May 11, 2013 at 3:51 pm #
  4. For better performance PHP isn’t installed using yum package. It was compiled into the system. To install pdo MySQL you’ll need to recompile PHP with pdo. The same goes for Nginx. Use the “Contact” form from the top nav if you require further help.

    @hydnj May 11, 2013 at 3:59 pm #
  5. What username should I use to access the AMI the first time? Root is just throwing a Permission Denied (publickey), even though I’m using the keypair which was used to spin up the instance. (for example: ssh -v -i /path/to/pemfile root@instanceip)

    Bob May 29, 2013 at 8:09 pm #
  6. Disregard. Mixup with my pem files. Sorry for the spam.

    Bob May 30, 2013 at 2:26 am #
  7. Thanks for sharing the AMI Hayden. This has been very helpful for me and sure others too would benefit from it. I noticed that the template has word press demo built into it and when I accessed the homepage, it was really slow and the site was not even coming up completely either – broken images, no style sheets applied etc.. Do I need to do any tweaking to make it run faster and/or config something? Here is the link -> http://23.23.237.66/

    Anonymous June 5, 2013 at 1:39 am #
  8. I’ll fix that in the next update, by removing wordpress completely. When I first launched the AMI I created a test EC2 instance and it seems the default wordpress install left in the directory is still trying to pull from that inactive IP. So you can just delete wordpress completely then reinstall. Or you can use PHPmyAdmin to edit the wp_options table and simply replace the two url options that are pointing to the old EC2.

    I took that EC2 offline because it costs about $20 per month just to run a demo.

    @hydnj June 5, 2013 at 1:50 am #
  9. Thanks for the quick reply and understand. I will reinstall it and see if that performance is any better.

    Anonymous June 5, 2013 at 1:54 am #
  10. Note that its not a “performance” issue. Your EC2 is trying to load an IP that no longer exist = timeouts. Also, even if the original EC2 still existed, it would not work correctly because that IP was the IP of the EC2 I build then cloned to create the AMI image, but the IP should be “your” EC2′s IP instead.

    So going forward I will remove the WordPress install from the original Nginx image I created and then push the AMI update.

    @hydnj June 5, 2013 at 1:58 am #
  11. I am trying to login to MySQL with no luck. What is the password for MySQL?

    Sam June 5, 2013 at 5:12 am #
  12. Use this to set your own password:
    http://www.thegeekstuff.com/2009/07/how-to-reset-forgot-mysql-root-password-on-unix-linux-windows/

    Or better, MySQL is installed using repos so just reinstall MySQL.

    @hydnj June 5, 2013 at 6:09 pm #

Leave a Reply

7 Shares Google+ 7 Facebook 0 Twitter 0 LinkedIn 0 7 Shares ×