Rewriting URLs with Nginx

Rewriting URLs with Apache HTTPD can be pretty ugly. With Nginx it is a breeze. Take a look to this example: server { listen 80; server_name my_old_domain.com; rewrite ^/(.*) https://www.my_new_domain.com/$1 permanent; } This will not just redirect your old URL to your new URL. It passes all the parameter to your new URL, too. IfContinue reading “Rewriting URLs with Nginx”

Load balancing with Nginx And Unicorn

Nginx is a pretty awesome lightweight Web Server for Linux. You can use it to deliver static web content. But you can use at as a load balancer, too. If you have a Ruby on Rails Application running on multiple unicorn servers, than Nginx can do the load balancing for the unicorn servers. Just addContinue reading “Load balancing with Nginx And Unicorn”

Installing Nginx 1.0.2 on Yellow Dog Linux

I just got an Yellow Dog Linux (YDL) up and running on Amazon EC2. YDL is based on Red Hat. The installation tool is called “yum”. It is similar to debians “apt-get” tool, but it is based on RPMs. Anyway. You can install nginx via yum with this command: sudo yum install nginx But thisContinue reading “Installing Nginx 1.0.2 on Yellow Dog Linux”