pig-monkey.com
Here are recorded many goings and comings, doings and beings; stories, symbols and meanings. Gossamer threads that may be woven into a larger web: a story of this Age of the World.

An Ubuntu VPS on Slicehost: Wordpress

June 10, 2008

As mentioned previously, I’ve recently moved this domain over to Slicehost. What follows is Part Four of a guide, compiled from my notes, to setting up an Ubuntu Hardy VPS. See also Part One, Part Two, and Part Three.

I prefer to install Wordpress via Subversion, which makes updating easier. We’ll have to install Subversion on the server first:

$ sudo aptitude install subversion

After that, the Wordpress Codex has a guide to the rest of the install.

Nothing further is needed, unless you want fancy rewrites. In that case, we’ll have to make a change to your Nginx vhost config at /etc/nginx/sites-available/mydomain.com. Add the following to your server block under location / {:

# wordpress fancy rewrites
if (-f $request_filename) {
    break;  
 }       
 if (-d $request_filename) {
     break;  
  }       
  rewrite ^(.+)$ /index.php?q=$1 last;

While we’re here, I usually tell Nginx to cache static files by adding the following right above thelocation / { block:

# serve static files directly
location ~* ^.+\.(jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|css)$ {
    root  /home/user/public_html/mydomain.com/public;
    expires 7d;
    break;
}

That’ll go in the https server section, too. Now, enable rewrites in your Wordpress config. I use the following “custom” structure:

/%year%/%monthnum%/%day%/%postname%/

Then, restart Nginx:

$ sudo /etc/init.d/nginx restart

And there you have it! You know have a working, new web server and mail server.

(Previously, we did a basic setup, installed a web server, and installed a mail server.)

Comments

blog comments powered by Disqus

Recent Photos

  1. Field Message Pad Covers: Rear
  2. Field Message Pad Covers: Front
  3. Rhodia Installed
  4. Rhodia Installed: Open
  5. Rite in the Rain Installed
  6. Rite in the Rain Installed: Open
  7. Field Message Pad Covers: Inside
  8. Field Message Pads
  9. Field Message Pads: Open
More photos...

Recent Tweets

  1. Remember when the Linksys WRT54G was going to change the world? http://t.co/XmIZUuLu The good old days… posted 9 hours, 5 minutes ago
  2. @bfgreen I bought a hank of that Glowire after your review. Pretty nice stuff! posted 1 week, 5 days ago
  3. Currently reading: Eastern Approaches by Fitzroy Maclean http://t.co/OkPhTLJz posted 2 weeks, 1 day ago
  4. I need one of these bio security packages for my bike: http://t.co/Tts7EbuC posted 2 weeks, 3 days ago
More status updates...