The
Ultimate
Business Machine

Technology, business
and innovation.

And, not least, about
the Mac.

Weblog Archive Cutedge

by: Bernard Teo






Latest Joy of Tech!

Joy of Tech ... from Geek Culture



Creative Commons License

Copyright © 2003-2012
Bernard Teo
Some Rights Reserved.

The Ultimate Business Machine - Archives

List of Categories : Commentary * Database * Singapore * Technology * Travel *

Sun 20 Mar 2005

WebServer Monitor

Category : Technology

I've been using this for about two years. I built this, in AppleScript Studio, even before I built Sendmail Enabler, and way before Postfix Enabler.

I've been using it to monitor my web server log (i.e., the Apache log file) remotely from wherever I happen to be. It's been quite useful, knowing which pages people find useful on my site, as well as all the places that happen to refer to something that I've written.

But I've never released it because it was slow (if you're trying to load in more than 3000 lines of server log records using AppleScript Studio). And, also, because I think it'll bring me even more queries than I have time to answer, e.g., in order to use this, you'll have to know how to set up an auto SSH (Remote Login) connection on the command line first. Even though you only have to do it just once, it's really too difficult to explain.

But, now, I think I've solved it. Both questions. Firstly, I've re-written it in Objective-C and it's fast enough to load in, say, 10000 lines of log records reasonably quickly.

Then I've also, finally, found the time to write a utility that will help a user set up the SSH (which means Secure Shell) connection from whatever machine (an iBook, say) he wants to use to monitor his server from - with just one click and without knowing any Unix. All he needs to provide is his password for the administrator account on his server machine.

He does this in the Preferences Window in WebServer Monitor, which appears automatically when the program launches, if an SSH connection to a server machine is not yet set up :

As shown, in the picture above, you can set up a Remote Login connection to your server machine from your roving iBook, with just one click.

Once you're done, you can do one more thing from your iBook - set up the server's Apache log file so that it'll report referrer information (i.e., the pages that refer to pages on your web site). The Apache log file is not set up that way, by default, but you can change it.

With the WebServer Monitor set up to show the referrers' URLs, you're just one click away from knowing how your pages have been referred to from elsewhere :

This is one of the fun things about looking up your referrers. You never know what might turn up. For example, that referrer URL above will lead me to :

Have fun, using WebServer Monitor. You can download it from here, right now.

A couple more things. One, you can open up more than one window and get the server logs from more than one site, so long as you have a Remote Login connection set up to each of these servers.

To access the server log on the local machine, just enter "localhost" as the server.

Also, like true document-based Cocoa applications, you can save each log file and open them again later, just by double-clicking on them. That'll launch WebServer Monitor. No icons, as yet. There are lots more things we can do with this, once we've managed to get ourselves up to here.

Posted at 11:37PM SGT | permalink


Mac@Work
Put your Mac to Work

Sivasothi.com? Now how would you do something like that?

Weblogs. Download and start a weblog of your own.

A Mac Business Toolbox
A survey of the possibilities

A Business Scenario
How we could use Macs in businesses

VPN Enabler for Mavericks

MailServe for Mavericks

DNS Enabler for Mavericks

DNS Agent for Mavericks

WebMon for Mavericks

Luca for Mavericks

Liya for Mountain Lion & Mavericks

Postfix Enabler for Tiger and Panther

Sendmail Enabler for Jaguar

Services running on this server, a Mac Mini running Mac OS X 10.9.2 Mavericks:

  • Apache 2 Web Server
  • Postfix Mail Server
  • Dovecot IMAP Server
  • Fetchmail
  • SpamBayes Spam Filter
  • Procmail
  • BIND DNS Server
  • DNS Agent
  • WebDAV Server
  • VPN Server
  • PHP-based weblog
  • MySQL database
  • PostgreSQL database

all set up using MailServe, WebMon, DNS Enabler, DNS Agent, VPN Enabler, Liya and our SQL installers, all on Mavericks.