Naked Domain Redirect on NGINX

This will be a quick snippet post about a problem I encountered today. What’s the best way to redirect your naked domain (like madpad.me) to “www.madpad.me” in your browser, if you are using nginx as your server? In nginx you could use an if statement to check and then redirect, but this is bad practice. ...

Running Node (Forever) on Ubuntu

In our last post, we covered how to install Node.js and nginx on Ubuntu. We had Node.js running in the background with a terminal command…but what if this process got interrupted or stopped for some reason? Then our application would stop working. We should have something in place that would start up our Node app ...

NGINX and Node on Ubuntu 12.04

In previous posts, we have covered how to set up an Ubuntu server and how to set up an Apache (web) server. There is, however, another web server that lately has been more popular and is very efficient. The other web server is called nginx. A mentor has mentioned to me several times that nginx ...

Hosting PHP with Heroku

In a previous post we have talked about using Heroku as a hosting platform for us. Often times Heroku is used with a Rails app, and most recently it has been used to host Node apps as well. Heroku, however, can also be used for hosting PHP apps. Let us cover how to use Heroku ...

Changing EC2 Instance Size on AWS

Changing EC2 Instance Size on AWS
Suppose you have an EC2 instance on AWS (Amazon Web Services) but when you had set it up, you had chosen a specific instance size. Though the size (and power) of that instance could have been good then, over time this instance could just no longer meet your needs. So…how would you go about boosting ...

Heroku with GoDaddy 15

Heroku with GoDaddy
So you have hosted your app on Heroku and you bought a domain name from GoDaddy. Now how would you connect the two? Let’s go over the steps on how to do this. There are a couple different parts. Go to the terminal and add the Godaddy domain to your Heroku app. From the command ...

Links for Learning

I’ll be trying to post every few weekends (no promises) a few links that I think are helpful for web development. Let’s look at some links I thought were pretty awesome. I’ll try to highlight what’s really good about each link. This link has some useful CSS / JS snippets, but the first snippet is ...

Sublime Text and Snippets 1

Every developer has their favorite text editor to write code in. Some people prefer TextMate, or Notepad++, or even Eclipse. I have definitely used TextMate and Notepad++ in the past, but for the last year I have been strictly a Sublime Text person. Sublime Text is a beautiful simple text editor with tons of plugins, ...

Create a Database User and Give Permissions

Suppose you have a web server and have several different websites running on it. You most likely have a different database for each website and if you don’t you definitely should! Each database should grant access to one or multiple users. However each of these users should be specific to this database. One user should ...

Virtual Hosts with Apache on a Mac

One best practice with building websites and web applications is to build and test locally. In a previous post, we briefly covered how to deploy a WordPress install on your localhost. However this time we will cover how to install Apache on a Mac and deploy several virtual hosts. This means that if you type ...