Archive

Archive for the ‘Nginx’ Category

Accepting SSL and SSH traffic on the same port with sslh

October 12th, 2011 No comments

Sometimes you need to SSH to a server, but port 22 is blocked by a firewall in your path. Typically in these situations you can set sshd service to listen on port 443, and bypass the firewalls, which are generally open on this port. But what if the same machine is also hosting your websites, which need to listen on port 443 for HTTPS traffic? Do you have to choose one or the other – your website running secure or your machine being accessible from behind firewalls? Read more… Accepting SSL and SSH traffic on the same port with sslh

Categories: Apache, Linux, Nginx, SSH, SSL Tags:

Setting a maintenance page with Nginx

February 10th, 2011 1 comment

I recently had a need to set a maintenance page with Nginx. The process was simple to redirect everything and return a 503 (Service Unavailable), but a problem developed when the maintenance page needed access to the stylesheets and images of the main site. So we could no longer use a simple ‘redirect everything’ rule. I searched for an answer and couldn’t find anything that seemed right. Most of the answers were everything from ‘use inline stylesheets’ to ‘serve the images and css from another server.’ After a bit of tinkering, I came up with a very simple solution.

Read more… Setting a maintenance page with Nginx

Categories: Best Practices, Nginx Tags: