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
- made a new ‘virtual server’ (a.k.a vhost) for number9.hellooperator.net
- got rid of wildcard ”ServerAlias *.hellooperator.net” on the main vhost so the second one would match
- set some ServerAliases on the number9 vhost
- mod_proxied the whole number9 vhost → lighttpd
- unproxied the main vhost and added an A record for it (fixing dav/svn/ical in the process).
getting virtual subdomains to work
- made index.html in docroot/testsub
- setup testsub.domain.com at DynDNS pointing to textdrive
- started tweaking until testsub.domain.com showed the index I’d made
- 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
- backed up docroot and db
- ran upgrade.php on existing server to get 1.2 ->1.5
- gasped as it actually worked. Theme is screwed but that’s ok.
- mysqldumped the new db and setup the table_prefix
- rsynced oldbox:docs → textdrive:docroot/sub
- loaded dumped db into a fresh textdrive one
- checked ’helloooperator.net/sub’ worked.
- repointed dns
- sub.hellooperator.net worked.
Mainly blogging this so the next one goes a bit smoother….