I recently used Apache 2.0’s HTTP Basic Authentication (via mod_auth_dbm) to restrict access to portions of my website. It’s simple as pie. (continued…)

Someone asked me for the imagescraper code, they are going to try a PHP port for a class. It’s GPL’ed now, available here.

(continued…)

Been tweakin’ my life away with my silly google-in-a-frame portal. You put your search request into a top-left frame. It then drops google results in small little nuggets down a thin left pane, under the request. When you hover over each link, it gives you the link google details in a tooltip (ala DHTML). When you click, of course, the right pane fills with the result. You can flip around in the results at lightning speed. Next I think I might try working on prefetching the first few results. I’m trying to get to the maximum google consumption rate that my brain can manage. Let me know what you think so far…

I am no longer a total Cyrus IMAP newbie. Cyrus IMAP newbies don’t run and administer Cyrus IMAP servers, at least not for long.

That said, I’ve lost a lot of email along the way. This stuff hasn’t been easy or straightforward. That’s mainly due to linux’s modular architecture, which is the only way to go, but it’s a mixed blessing. By the time you really figure out something like Cyrus, you’ll likely have learned a lot about linux’s authentication (PAM), your mail transport agent (MTA – it actually listens for mail and hands it off to Cyrus), other available MTA’s (sendmail, exim, qmail… why are there so many?), PHP and Mysql configuration, and so on.

So I’m not going to try to explain what it takes to get it all working. The main doc that makes that attempt is here. Use it as a reference – it’s extremely unlikely you’ll be able to actually go through the outlined steps directly. I definitely recommend trying to find a pre-built package for your distro.

I just wanted to document the steps that are needed with postfix and cyrus to get multiple virtual domains handled on one installation. There are two files that need tweaking, /etc/postfix/main.cf, and /etc/imapd.conf.

To do…

One apache installation can easily host multiple domains using a couple different VirtualHost directives. Basically, a standard HTTP request includes the requested domain name, and Apache uses that to determine which pages to serve up.

From what I understand, SSL-encrypted sites are a wee bit trickier, because HTTPS requests are encrypted and the requested domain name isn’t available. So all you have to go by is the IP address…. and the port. So that’s the trick – you have to use a different port for each SSL-encrypted domain name you want to support.

Steps to make Apache listen for SSL requests for different domains on 443 and 8080:

  • Add “Listen 443” and “Listen 8080” directives at the top of your apache configuration.
  • Add a “VirtualHost myfirstsite.com:443” block for the first site, and a “VirtualHost mysecondsite.com:8080” for the second.
  • Make sure your firewall allows incoming traffic on both ports.

    See? Easy. :> And since your website will typically redirect traffic to SSL pages (as opposed to expecting users to type them in), hopefully using a non-default port won’t be a problem.