Categories
BSD/Linux DrupalRecover Tech

Switched to nginx

Reposting from 2013 – why did I post this originally on Valentine’s day – so romantic!

I’m going to start another blog. I’ll post a link here once it’s up. As a part of that I want to share 1 server with mulitple domains. So that’s going to add some load. I started with Apache but decided to give nginx a try. It always sounded to be more efficient and randomly the side is brought down by too much activity. Maybe nginx will be better. So far so good.

So after a bit of new learning (right after I pretty much figured out Apache!) the site seems to be working and using nginx instead of Apache.

The thing that took this the most time was the fact that NetBSD is different from FreeBSD… There’s no Portmaster to do it all. There’s no nice update of the ports system, you connect direct to CVS.

My first flaw was to pull the most recent files from CVS using:

cd /usr/pkgsrc && cvs update –dP

What you really want is to pull a stable package like so:

cd /usr/pkgsrc && cvs update –dP -rpkgsrc-2012Q4

Anyhow doing it without pulling the stable package seems a bit like using Debian test or experimental perhaps, not everything works. So I did the usual fun building of stuff, it failed, and random packages were messed up. Then I found I could retreat and just pull a stable package and rebuild everything. Much better.

One other random bit is it gets me back to how (in my opinion) the BSDs are better to Linux. On Debian you’d mess up the entire install if you were on experimental. At least on BSD you’ve got the stable core that doesn’t get messed with.

As a part of that original failed attempt random bits of the server got uninstalled too… Exim went away, random bits of php needed to run Drupal went away, great fun. Anyhow if it happens to you here are the php libraries you need in addition to regular old PHP, this seems the third time I’ve needed to go through this so here they are:

extension=mysql.so
extension=pdo_mysql.so
extension=pdo.so
extension=json.so
extension=dom.so
extension=gd.so
extension=mbstring.so
extension=uploadprogress.so
extension=bcmath.so
extension=zlib.so
extension=apc.so
Mind APC is only needed since I’m using nginx now, didn’t need it with Apache since Apache has mod_php. Or maybe Apache would have benefited from it? Also, uploadprogress doesn’t work in nginx, only Apache.

The nginx setup on their wiki worked perfectly once I had all the php modules installed. It didn’t work so good until then.

Leave a Reply

Your email address will not be published. Required fields are marked *