virtual insanity

Posted by Dick on September 07, 2005

Thought I’d migrate gfs (wordpress) blogs to textdrive to take advantage of the mod_security umbrella.

Since she has a few I thought I’d set them up as virtual subdomains (sub.yourdomain.com → yourdomain.com/sub) and have them share a database. Started with a simple one that gets hundreds of comment spams a week.

I was expecting problems getting it into textdrive because I’d set up the main (only) vhost to ”ProxyPass /” → typo (on lighttpd). This ( and the fact that the A record for hellooperator.net doesn’t point to textdrive ) caused all sorts of problems with dav, ical and svn, as you’d expect.

moving the proxied blog to a dedicated vhost
  1. made a new ‘virtual server’ (a.k.a vhost) for number9.hellooperator.net
  2. got rid of wildcard ”ServerAlias *.hellooperator.net” on the main vhost so the second one would match
  3. set some ServerAliases on the number9 vhost
  4. mod_proxied the whole number9 vhost → lighttpd
  5. unproxied the main vhost and added an A record for it (fixing dav/svn/ical in the process).
getting virtual subdomains to work
  1. made index.html in docroot/testsub
  2. setup testsub.domain.com at DynDNS pointing to textdrive
  3. started tweaking until testsub.domain.com showed the index I’d made
  4. tried to figure out why I kept getting the top level index.html.

Turns out it was because of step 2. in the ‘moving proxied blog’ list above.
I was getting the default textdrive index page (because the entire vhost wasn’t recognized) and mistook it for my own index.html. Not sure how I could have avoided that, since number9 is a subdomain of the main site.

Anyway, set testsub.hellooperator.net as an alias on the main vhost and I could see my custom index page.

the wordpress upgrade / server move
  1. backed up docroot and db
  2. ran upgrade.php on existing server to get 1.2 ->1.5
  3. gasped as it actually worked. Theme is screwed but that’s ok.
  4. mysqldumped the new db and setup the table_prefix
  5. rsynced oldbox:docs → textdrive:docroot/sub
  6. loaded dumped db into a fresh textdrive one
  7. checked ’helloooperator.net/sub’ worked.
  8. repointed dns
  9. sub.hellooperator.net worked.

Mainly blogging this so the next one goes a bit smoother….

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

Comments