Configuring Lighttpd for WordPress with Rewrites

Today I had to configure a WordPress website to use Lighttpd. I looked for the proper rewrites to use and only received garbled information about the rewrites. So instead of forgetting it again for the umpteenth time, I will post my getting WordPress to work with Lighttpd tips / tricks here.

First up there are three key rewrites to get Lighttpd to work with WordPress. They are as follows: (note mod_rewrite will need to be enabled and this is in the lighttpd.conf).

url.rewrite = (
        "^/(wp-admin|wp-includes|wp-content)/(.*)" => "$0",
  "^/(.*).(.+)$" => "$0",
  "^/(.+)/?$" => "/index.php/$1"
)
									

The second key item is making sure that the error handler is set properly.… Read More

Varnish is Running out of Control!

A slug walking across a keyboardMy servers now a days run Varnish simply for the speed. On my main site Varnish was getting out of control with the RAM / Memory usage. Varnish would slowly creep up and eat all the memory, even though I was trying to hack Varnish to only use 128MB of ram, especially since the site is hosted on a lowendbox by Frantech (Buyvm.net). The answer, which I am not really sure WHY it works, but inside of vcl_fetch in the /etc/varnish/*.vcl file, I had set beresp.grace to be 30M, I tried this with 2M as well, but ultimately I took out the grace period setting and now my box is running Varnish with Lighttpd and PHP-FPM getting around 15k-30k unique hits a day and not going over 156MB of RAM usage.… Read More

Setting up Mosh (Mobile Shell) Server on Debian Squeeze

A key with a browser behind it.My curiosity takes me to a bunch a different programs that I like to hack around with. Today it took me to setting up a Mosh Server. Mosh is a short term for Mobile Shell, which is attempting to act as an SSH (Secure Shell) replacement for a connection-less state. With Mosh, you are able to roam around on a 3G / 4G / Wifi / Work / Home and not have the need to always reconnect your SSH sessions or have a dedicated server setup with screen, which if that server goes down then you will have to reconnect all the sessions again!… Read More

↑ BACK TO THE TOP ↑