Nginx

Nginx, Node, MySQL on VPS

This is a writeup to setup full node stack on a VPS instance. The min memory requirement for the VM is 256M, but ideally should be 512M or higher. I'm currently using VPS instances from www.ramnode.com. It describes how to setup a VPS (virtual private server) to run Nginx, Node.js and MySQL on CentOS 6.x. Here's a quick overview of how to secure a VPS (virtual private server) running CentOS 6.x and configure it. Secure the server Setup iptables Setup MySQL Setup Nginx Setup Node.js SECURE THE SERVER passwd root useradd myuser passwd myuser visudo Add line: myuser    ALL=(ALL)    ALL mkdir ~/.ssh cat id_rsa.pub >> ~/.ssh/authorized_keys chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys vi /etc/ssh/sshd_config PermitRootLogin no PasswordAuthentication no sudo…

Nginx, PHP on VPS

This is an update to the original post for setting up Apache, PHP on CentOS. Last year has been great and there is an abundance of vendors providing VPS on the cheap. My goto website for checking the latest on VPS vendors is www.lowendbox.com. For this post I went with a tiny 128MB VPS from www.ramnode.com. This server setup is for Cent OS 6.x with Nginx + PHP-FPM + MySQL. It describes how to setup a VPS (virtual private server) to run Nginx, PHP and MySQL on CentOS. The VPS uses a tiny amount of memory (total server memory is 128MB) and is running on CentOS 6.x. The intent is to setup a fully functional server that has been secured using iptables and configured to use Nginx, PHP-FPM and MySQL for production. It uses CentOS services to manage all the applications and is configured to use l…

SSL on Nginx

This post is an attempt to document end-to-end the process of getting and installing SSL certificate on nginx server. The actual installation is pretty straight forward, its the getting the certificate part which usually trips most first time users. In this post I'm specifically referring to the filenames as used by Comodo SSL Certificate, but in the past I've used PositiveSSL certificate which is also issued by Comodo but has a slightly different trust chain. In general, shorter trust chains are better and will result in better performance. For a cheap certificate that cost $9/year PositiveSSL has a short trust chain of depth 3, that's hard to beat. Main steps for installing SSL on Nginx: Generate CSR Purchase SSL certificate from a vendor Receive approver email Approve SSL certific…