Using nginx to protect your RethinkDB admin control panel

Using nginx to protect your RethinkDB admin control panel

If you’re using RethinkDB then you’re probably aware that your admin control panel has no protection at all. This is fine on your development server/home pc, but what about when you want to put it in to production, or a production-like environment? We want to have RethinkDB firewalled off and our admin panel secured. Thankfully, using nginx this is a very simple task.

If your admin panel does not run on 29017 then you will need to change that. You will also need an auth_list in your /etc/nginx/ folder, or whatever you choose to call it. That is where your auth definitions should be stored, this allows you to reuse them for multiple sites. Personally, I use IP restriction and htpasswd auth, but you’re free to do whatever suits you best.

The reason I redirect Google is because I find Google relentless. A few minutes after your domain has propagated Google will be on you attempting to record everything you have and it will never stop. The redirect tells Google nothing exists here.

Now you can firewall deny access to your admin panel but still have access to it.


About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!