All posts filed under: servers

Nginx proxy_pass a folder to WordPress

comments 3
servers

After a rash of security updates for WordPress, I finally buckled down to move our install of WordPress off to it’s own server. This would be easy if we were running the blog on it’s own domain, but it was actually living under /blog on our main domain for SEO reasons. Running nginx as a reverse proxy to WordPress on a different machine was not an easy task. A lot of guides did not seem […]

rvm can not be run with `set -o posix`

Leave a comment
servers

Setting up a new Ubuntu 12.04 LTS server I kept getting the error below when trying to run the rvm command. [crayon-5f373de3789fd125853289/] This was solved by changing the login shell for my user. It prompts for your password and shell which I changed from /bin/sh to /bin/bash. [crayon-5f373de378a03094404775/]

Logging nginx cookies with dashes

comment 1
servers

Strangely nginx does not support variable names with dashes or other characters other than lower/uppercase letters, digits or underscores. This means that if you are trying to log cookie values which contain dashes, as in my case, you can’t do it. Two workarounds are logging the all the cookies in one go, which can be overwhelming: [crayon-5f373de378a67461371284/] The other option is to map your cookie names to a variable that can be used by nginx: […]

Serve a static file on a specific URL in nginx

servers

I recently had to serve a static file on a specific url in nginx. The requirement was that /sapm/jcb should show a specific page, but I of course forgot about the html extension so the end result was my file only appeared on /sapm/jcb.html. An nginx conf change sorted it all out. [crayon-5f373de378aba116440726/]