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”
Tag Archives: 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”
Bad Gateway with NGinx & Unicorn
I am using NGinx as proxy to load balance the traffic. Behind Nginx their are some unicorn servers. On Friday I did some changes on the server and I realized that I am always running into a Bad Gateway error. The way from Nginx to unicorn worked. But the way back not really. I googledContinue reading “Bad Gateway with NGinx & 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”
Nginx
Nginx is a high performance web server that can handle the C10K problem. Check this out. Nginx vs Apache: http://www.joeandmotorboat.com/2008/02/28/apache-vs-nginx-web-server-performance-deathmatch/ http://stackoverflow.com/questions/475386/apache-vs-nginx-vs-lighttpd-which-is-simpler-to-configure-and-administer Nginx now hosts nearly 7.65% (22.8M) of all domains worldwide.