Pages Menu
Categories Menu

Webserver admin fun

Technically I’ve been a webmaster since December of 2001. I’ve been writing web pages for years, but posting to CompuServe’s ‘Our World’ or AOL’s ‘Hometown’ is a far cry from running your own domain. By the same token, as this last couple of months has taught me, running your own domain is a far cry from running your own web server.

When I decided in late 2001 to go into the ‘big leagues’ and register a domain name and buy space on a web host that didn’t force pop-up ads onto its visitors and gave CGI access, I was happy as a clam. Having seen roughly 50 or 60 security bullitens for IIS over the years, and only a handful for ftpd, apache, and open-ssl, I decided going linux was probably safer than going Windows.

I knew some command line Unix from exposure at my work, but still thought it was a big deal when I used vi to edit files on the host instead of FTPing them back and forth from my Windows workstation. I had been writing Perl scripts at work to do simple things like read from databases, do searches and sorts, etc. The transition to doing webmaster work on a Linux server was pretty smooth, and it was a long while before the hacker in me started craving more.

I had built up some content on my previous host, AOL (why I wanted to leave AOL should be self-explanatory, so I won’t bother discussing it here), so I had more to offer than a chili-recipe/picture-of-cat web page. I spent a lot of time retooling the pages, and started work on what would be the atengine to add a simple navigation banner and uniform layout to all my rantings. That work, and my continued study of Perl and Linux/Unix kept me busy for awhile. I branched out a little and learned emacs and toyed a little with lisp, and at work I took over admin duties for a small Unix server whose old admin had left the company. That’s worth a little sidebar.

Jaguar is the host name of a little Sun Solaris server at Sterling that runs Unix. The previous owner was the man who originally got me interested in Unix and Perl. He left Sterling about 3 years ago, and there was no real admin until they offered it to me 6 months ago. That isn’t to say that no one worked on the box in 3 years and it gathered dust, but just that no one was the official admin, and everything was out of date on it, including the box itself.

So I quickly learned the joys of ‘tar xvf ‘, ‘./configure’, ‘make’, and ‘make install ‘ as I installed emacs and bash, and upgraded apache, tar, and various and sundry libraries. To an outsider it may have seemed that I knew what I was doing, but at that time I had no idea what a cron job was. Fortunately, I’m a quick study. After awhile, I decided that the world of Unix/Linux was cool enough to experiment with it at home. So I downloaded a Debian/GNU Linux .iso file, burned it to CD, and spent the next week trying to get it to work.

The bit with installing and configuring Linux took a lot of energy. Because of it, I hit a creativity slump, and let my web page go update-less for weeks at a time. I may have stayed in my slump for longer, but the webhost I was using, Host Department, had their contract canceled from the real webhost they were reselling for, CIHost. From my point of view, Host Department lied to me, and CIHost took my page down before they gave me the option to sign up with them directly. I was a little peaved at both companies. I signed up a temporary account with CIHost to keep my page up, but in the meantime I took a second computer at home and put a trimmed-down Linux install on it, whose main features were sshd, apache, and exim. After a few weeks of experimenting, I moved my page to the second computer at my house, and pointed my domain name there.

I had some startup problems after I went live, and I wisely kept a synched copy of the page at home and at CIHost. Eventually I figured out how to manage apache and exim, bought a better router for my home network, and recompiled my kernel with ipchains support to block out the more annoying script-kiddies. After awhile, I got so sick of the hack attempts that I redirected default.ida, cmd.exe, etc. to a ‘go away’ file and stopped logging them to my access log. I may reverse my thinking on that later and start sending my access logs to places that collect them for the purpose of tracking script kiddies to put the beatdown on them.

So now I’ve been running from home for 20 days more or less without incident. The move to my home computer, coupled with my long-term goal of leaving the tech industry in favor of working with kids, has inspired me to write more code and content. I’ve been publishing code under the GNU GPL, and diving deaper into the world of server admins. After a fair amount of exposure to Perl, Linux, and Apache, I have a little more fun with it. Take this sample session using a Perl one-liner to track the heavy hitters of my page:

ssh -l root’s password:

Last login: Fri Nov 29 20:07:29 2002 from on pts/0
Linux at 2.2.20 #1 Sat Apr 20 11:45:28 EST 2002 i686 unknown

Most of the programs included with the Debian GNU/Linux system are
freely redistributable; the exact distribution terms for each program
are described in the individual files in /usr/share/doc/*/copyright

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Nov 29 20:07:29 2002 from
at:~# cd /var/log/apache
at:/var/log/apache# ls -l ac*
-rw-r—– 1 root adm 201194 Nov 30 09:36 access.log
-rw-r—– 1 root adm 450197 Nov 24 04:44 access.log.1
-rw-r—– 1 root adm 57084 Nov 17 06:23 access.log.2.gz
-rw-r–r– 1 root adm 57179 Nov 10 05:51 access.log.3.gz
-rw-r–r– 1 root root 7085 Nov 3 05:17 access.log.4.gz
at:/var/log/apache# date
Sat Nov 30 09:45:57 EST 2002

Hmm, last hit was about 10 minutes ago. Server and router must both be up.

at:/var/log/apache# perl -e ‘while(<>){/(S+)s/;$h{$1}++;}
for(keys %h){$h{$_}.=” “.$_.”n”;}for(sort {$b $a} values %h){print;}’
at:/var/log/apache# cat visitors.log


at:/var/log/apache# host domain name pointer

oohh, college boy, eh? Let’s see what you’re looking at…

at:/var/log/apache# grep access.log – - [25/Nov/2002:19:55:21 -0500] “GET /enantiodromos/aboutme.html
HTTP/1.1″ 200 4242 “″
“Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)” – - [25/Nov/2002:19:56:38 -0500] “GET /enantiodromos/Type.html
HTTP/1.1″ 200 1389 “”
“Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)” – - [25/Nov/2002:19:56:43 -0500] “GET /enantiodromos/typecalc.html
HTTP/1.1″ 200 8800 “”
“Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)” – - [25/Nov/2002:20:00:53 -0500] “GET /enantiodromos/Type.html
HTTP/1.1″ 200 1389 “”
“Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)” – - [25/Nov/2002:20:00:56 -0500] “GET /enantiodromos/Typeintro.html
HTTP/1.1″ 200 1377 “”
“Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)” – - [25/Nov/2002:20:01:10 -0500] “GET /enantiodromos/Typewhy.html
HTTP/1.1″ 200 934 “”
“Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)” – - [25/Nov/2002:20:02:59 -0500] “GET /enantiodromos/SETstuff.html
HTTP/1.1″ 200 1470 “”
“Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)”


Anything with /enantiodromos/ is a page from my roommate. He has a lot of pages on RPGs, music, and Myers/Briggs/Jung type theory, all of which is popular with the college crowd. As expected, the hours I put into this page to make it functional and nice looking don’t really draw a big crowd. If I started talking about GURPS or the wisdom of being an INTP (which I am), maybe I’d generate some traffic for myself.

Fortunately, I’m not doing this to be hugely popular and a hit with the ladies. Maybe folks in the open source movement will eventually take notice after I publish more code and keep developing the site. But until then, I’ll settle for always the bridesmaid, never the bride.

at:/var/log/apache# exit
Connection to closed.

Post a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>