As you can see by another post, I decided to reinstall the server. This isn’t really a problem, I have pretty good backups. I’ve installed apache and friends a bagillion times. However, Postfix(chroot)+Dovecot authenticating from MySQl, that doesn’t install quite so smoothly.
Just for my future reference, and maybe helpful for somebody, someday. Clearly not a tutorial. The postfix chroot = /var/spool/postfix
First, get the saslauthd files into the postfix chroot. Edit /etc/conf.d/saslauthd (or /etc/default/saslauthd), and add this:
Read moreI have the need to generate an SSL cert (Apache2) about once every 3 months. And since I’m cheap, I don’t ever actually buy one, I just self-sign it. And every time I forget the commands needed. So, here they are, for my reference only.
1) Generate Private Key
openssl genrsa -des3 -out server.key 1024 2) Generate a CSR
openssl req -new -key server.key -out server.csr 3) Remove passphrase
cp server.key server.key.org openssl rsa -in server.key.org -out server.key 4) Generate Self-Signed Cert
Read moreI’ve vowed to not use transparent PNGs until almost everybody has switched to IE7, where they are actually supported (despite being supported by every other major browser). I’ve done the hacks, and have had good results. I like using PNGs, I’ll admit it. Inkscape exports them directly, however one slight problem: transparency still exists. This isn’t really a problem since I’m not layering images, or is it?
My initial assumption is that IE would simple pull the white background and everything would be dandy. Well, we all know what they say about assumptions.
Read moreYou might be asking: why would you want to chroot ssh? Why use ssh anyways? Here are the quick answers:
FTP usually isn’t great. Unless sent over SSL, all information is sent cleartext. SSH usually is much better. SSH sends all data over an encrypted channel – the main drawback is: you can often browse around the system, and if permissions aren’t set right, read things you shouldn’t be able to. Chroot’d SSH rocks. The solution to both the above problems. So, let me tell a quick story.
When I started uni in 2001 I was a nerd. Still a nerd, I guess. I was cramped in my apartment on campus with like 5 boxes, most of them old p100s running Linux or OpenBSD. Life was good.
I started a …
Read moreFor one of my webapp projects I’m needing to layer two images. This isn’t a problem on my laptop – I just fire up GIMP, do some copy ’n pasting, and I’m done. However, since everything needs to be automated (scripted), and on a server – well, you get the point.
The great ImageMagick toolkit comes to the rescue. This is highly documented elsewhere, so I’m going to be brief.
Read moreFor one of my projects I need to generate thumbnails for a page. And lots and lots and lots of them. Even though I can generate them via a python script and a very light “gtk browser”, I would prefer to mitigate the server load. To do this I’ve decided to tap into the Alexa Thumbnail Service. They allow two methods: REST and SOAP. After several hours of testing things out, I’ve decided to toss in the towel and settle on REST. If you can spot the error with my SOAP setup, I owe you a beer.
I’m using the ZSI module for python.
Read moreAs some of you may know, I have some projects cooked up. I don’t expect to make a million bucks (wish me luck!), but a few extra bills in the pocket wouldn’t hurt. Plus, I’m highly considering further education, which will set me back a few-thirty grand. That said, one of my projects will rely heavily on Amazon Web Services. Amazon has, for quite some time now, opened up their information via REST and SOAP. I’ve been trying (virtually the entire day) to get SOAP to work, but seem to get snagged on a few issues. Stay tuned.
However, in my quest to read every RTFM I stumbled upon a post regarding Python+REST to access Alexa Web Search. After staring at Python code, especially trying to …
Read moreOver the years I have been shrinking the number of computers I own. At one point my dorm was littered with old P100s, running whatever OS I felt like playing with at the time. VMWare comes to help. In this recent oops, an image I made (for Windows XP), was slightly too small. I didn’t feel like reinstalling XP + cruft, so just resized the image. This is the process:
Read moreSo, you have a web server. So, you have PHP. So, you want to make it a little quicker? The following are a few ideas to let you do that. First, let me share my experiences.
I have always been wondering “what would a digg do to my site.” I mean, I don’t run a commenting system, so I’m refering to just some article. Because I prefer to manage my own server, I have decided to use a VPS (Virtual Private Server) from VPSLink. Before purchasing I searched around, read reviews, and finally tested it out. Liking what I tested, I stayed. However, since I just host a few ‘play’ sites (http/email/ftp), and a few sites for friends, I am not going to spend much money on a high-end plan. …
Read moreLet’s say one page on your site is getting hit hard. And I mean, it was digg’d or something. If the page resides on some CMS or blog, and each request is being processed by PHP and resulting in requests to your database, which, as they say, crap is gonna hit the fan. Well, at least if you’re cheap like me, you’ll try to squeeze every penny out of what you’ve got.
That said, mod_rewrite comes to the rescue.
There are only a few modifications that you need to do. The first is to ensure that mod_rewrite is enabled. If you have apache installed on debian, this might do:
Read more