The Internet Server Project - Part IV - DNS, WWW, Mail & Other Projects
Ok, you're on the net! You're just as accessible as Yahoo and Google...well, not exactly, you need to tie your domain name to your static IP address. Then, email service for that domain, and your domain really will be on the net.
DNS
Get past those numeric IPs. You should have the BIND software installed from your initial OS setup. There are two really good graphical interfaces to BIND, Yast (built into Suse, run "yast2" as root) and webminIn spite of those interfaces, first time out, use the text config files. Understand them. BIND and these files are a core internet technology. You'll need a text editor and have have to learn a little vi, emacs or whatever you come to prefer. Make sure you've read or know most of the first 5 chapters of the class tome on DNS, DNS & BIND. With that reference you should be able to follow the default BIND config (and following the references) in
/etc/named.conf. Be sure to "point" your domain and www.yourdomain.com to your static IP. Also, set the MX to yourdomain.com. I also recommend you reverse map your static IP to yourdomain.com. Having this can keep you out of trouble with certain spam sensitive mail servers, like AOL's. Your ISP controls the reverse DNS, but good ISPs like www.speakeasy.net will map it for you. When you can run
dig +trace @localhost yourdomain.com #substitute your domain here.from your DNS server and watch it go to the root nameservers, then back to your server to fulfill the request...well I was pretty jazzed when I saw that for the first time, but maybe that's just me.
Apache Web Server
If you succeeded previously, you should have been able to browse your server by IP address. With the DNS setup done, try http://www.yourdomain.com. If that doesn't work, time to brush off those debugging skills.If everything is working you can start putting your own html into
/srv/www/htdocs, starting with the index.html file. (Fedora and others put the default webdir in other places.)Next step with Apache is to learn some config. Start with a browse through the current Apache docs (2.2 at the time of this writing.) I always end up here, in spite of having used a few texts on Apache.
A great exercise is to start at the root config file,
/etc/apache2/httpd.conf, and look up the docs for the directives (on http://httpd.apache.org/docs). Be sure to follow the includes through the config tree. You'll learn a lot, and probably get ideas for how you can use your web server. Here are some experiments to try with Apache. Most of them are straightforward if you've traced through the default httpd.conf...many are just a matter of uncommenting a few lines:
- Turn on the homedir feature. That is, mydomain.com/~me maps to the /home/me/public_html dir.
- Turn on server-status and server-info and restrict them to your local network (deny from outside IPs).
- Setup vhosts, or virtual hosting (several web domains under one server, e.g., new.mydomain.com, etc.). Suse puts *.conf files in
/etc/apache2/vhosts.d. See the relevant docs and the template at/etc/apache2/vhosts.d/vhost.template - Try a few small php scripts to make sure you have that working, e.g., create a
/srv/www/htdocs/hi.phpwith
and browse to http://mydomain.com/hi.php<?php
echo('hi');
?> - Turn on https. (This task can get involved, be prepared to learn about ssl, esp the Openssl package.
Email Setup
To setup email is beyond the time & scope of this article. I'll eventually writeup my Postfix, Cyrus IMAP/POP, SpamAssassin, Horde setup. These websites (and a bit of googling) have reasonable documentation. The hard part is stitching it all together and locking it down.Each of these pieces can be built from source or installed via the Suse package manager, yast2. My older setup builds everything from source. Shortly, I'll be attempting a build from the Suse packages.
Finally, my selection of email programs is far from authoritative. Qmail + exim is an increasingly popular imap/pop solution, purportedly easier to configure than Cyrus. Courier IMAP is another option which I'm going to take a close look at for my next mail server build.
For server spam scanning, SpamAssassin is hard to beat. With Razor, Pyzor and DCC, along with RBLs setup in Postfix identifies spam better than most ISP systems.
There are many webmail systems out there. I use Horde because it was the best available 7 years ago. Squirrelmail is a great, easy to install & use, mail-only webapp. Zimbra is one of the slickest AJAX webmail's out there. (I haven't yet installed Horde's AJAX interface, dimp, which is in alpha now, and likely in beta or production by the time you read this text.
A Recommended Reference
As I was completing the final edits to these articles, I came across an outstanding, step by step guide The Perfect Server - Suse 10.3 (Suse 10.2 version). Though I haven't tried or read the build in detail, it looks like an excellent source of information, and is very step by step.This reference may be especially helpful for mail server setup.
The Fun Never Ends...
Here are a bunch of additional projects you can partake in, depending on your interests.Software Development
Content Publishing, i.e., Wikis & Blogging
Media Streaming
The End
I hope you've found this interesting, helpful and/or inspiring. Comments are welcome.Previous Page
Related links
| OpenSSL: The Open Source toolkit for SSL/TLS Posted by Rod, on Feb. 8 2008 | |
| Speakeasy - Speakeasy, Inc. - Broadband, Voice and Data Services - (34 clicks) Posted by Rod, on Feb. 8 2008 | |
| O'Reilly - Safari Books Online - 0596100574 - DNS and BIND, 5th Edition - (30 clicks) Posted by Rod, on Feb. 8 2008 | |
| Webmin Posted by Rod, on Feb. 8 2008 |


