Mac Web Servers: September 29, 2001

Web Serving with Mac OS X

by David L. Hart
An Excerpt from the Mac OS X Web Server Handbook

This overview introduces the levels you need to consider in establishing a fully functional Mac OS X Internet information server. This book considers the most common types of Internet services in use today–starting from a plain vanilla Web server to an interactive Internet community with e-commerce, file downloads, mailing lists, forums, and custom Web applications. To reach the widest possible audience, you should be prepared to support services such as FTP and e-mail in addition to the basic Web service.

I’ve learned the hard way that you should progress through the Big Picture levels in roughly the order suggested to get the best results when installing and maintaining these services. Let’s take a quick look at each of these levels.

Planning and Preparation

Chapters 2—5: Background and Planning. If you can resist the urge to jump straight from taking your new Mac out of the box to issuing your initial public offering, you and your visitors will benefit from a little time spent devising a plan of attack. You’ll want to assess the human, hardware, and networking resources you’ll need for your server.

You have to decide first who your audience is, then what information you are going to provide to your audience, and then how you will provide it. Supporting sound and video, for example, requires additional server software and also will place heavy demands on your server. Planning will help you address these sorts of potential downfalls and make informed software choices from the available programs for each of the servers–file transfer protocol (FTP), list server, and Web.

Obviously, the most important piece of planning for an Internet server is getting Internet access. I’ll discuss briefly how to obtain Internet access, if you do not already have it, and how to manage it on your Mac OS machine once you are connected. You also need to consider the demands a Web server will place on a computer. The most immediate concern is likely to be sufficient disk space to store all the information. If your server becomes popular, you need to ensure that memory, file transfers, network bandwidth, and processor power don’t limit the rate at which you can serve information. I’ll step through what these demands are and when in the development cycle they are likely to occur.

You then might want to think about "housekeeping"–these details will help you keep your Internet site up and running. For the most part, this involves the same tasks that you already know you should be doing for your computer–backups, disk management, security, server maintenance, and virus protection, for example–but that you’ve been putting off. And then you should consider how you want your intended audience to interact with your Web server. Whether you plan to phase in services or unleash them all at the same time, your first steps can put you on the easiest route to your eventual destination–or put you on a road potholed with a lot of reengineering and sleepless nights.

Chapter 6: Client Software. With the planning done and hardware selected, you are almost ready to start building your information server. First, however, you need to install the client software for the services you’ll be providing on your server. As the first visitor to your server, you’ll need to test whether the server functions as expected and whether the information is presented the way you want. I’ll briefly discuss installing client software, including a Web browser such as Netscape Navigator or Microsoft Internet Explorer.

Basic Services

Chapter 7: Web Servers. Your choice of Web server will affect many future decisions, so you’ll want to spend some time considering the options. Some Web server suites include an FTP server, a search engine, and mail services. Others may include integrated databases or e-commerce functions. Performance, extensibility, and administration may also factor into your decision.

In this book, I’ll provide an overview of the major and minor options–yes, there are quite a few Mac OS options. Next, the book will focus on few popular options, including Apache and iTools, WebSTAR, and Web Server 4D. All but the most casual Web servers will probably want to analyze their servers’ traffic, and I’ll talk about log analysis tools, too.

Chapter 8: FTP, E-Mail, and Search Engines. If you choose a Web server that does not provide FTP, e-mail, or search capabilities, or if your traffic demands dedicated computers and software for these services, you can provide these functions separately. Of course, let’s not forget that you may not need a Web server at all. This chapter will look at commercial and shareware options for FTP servers for file exchange, mail servers for individual e-mail accounts, list servers for reaching groups of subscribers, and search engines for crawling, indexing, and searching Web sites.

Advanced Services

Chapter 9: Databases and XML. Once you have established a Web server for delivering basic Web pages, your next step will be to extend the capabilities of your site with dynamic information features. A database is a common and critical step, and Chapter 9 describes options ranging from adding tab-delimited spreadsheet tables to integration with high-end relational database management systems. Many further extensions build on this choice of database. You may also want to prepare your site for the Extensible Markup Language (XML), which is rapidly growing in popularity.

Chapter 10: Guestbooks, Forums, and Chats. There are many other types of interaction and media content that you may want to provide to your audience. This chapter will look at community building software to establish guestbooks, forums, and chat rooms.

Chapters 11-12: Scripting and Web Applications. These chapters present your options for creating your own custom Web applications, from forms and Common Gateway Interface (CGI) scripts to dynamic server applications, to Java and JavaScript options. These are advanced topics, and in a single book, I can’t teach you everything you need to know about the programming languages I’ll mention. But as is true of all discussions in this book, I’ll get you started and point you to reference material available on the Internet.

Chapter 13: E-Commerce. In today’s electronic marketplace, you may also want your server to handle retail transactions. This chapter walks you through the requirements and software for hanging up your e-commerce shingle, and what you need to exchange goods for money electronically. I’ll take you through adding encrypted transactions to protect your customers’ information, filling up your online catalogs, providing electronic shopping carts, and processing credit card purchases.

Chapter 14: Live and Streaming Media. Finally, we will discuss delivery of live media through streaming audio and video and Web cams. If your goal with your Web site is to entertain as well as inform your audience, live media can keep your visitors coming back for more.

Presentation

Chapter 15: Development and Design. Now that you’ve established a fully functional server, you need to give it some information to serve. Creating the information you want to serve could take a couple of hours to several months, depending on the complexity of the information. For this step, you need a different set of tools.

In a change from the first edition of this book, I won’t be going into great detail on the syntax of the HyperText Markup Language (HTML). There are a multitude of tutorials and examples on the Web, created and updated by major sites targeting Web developers. I will discuss the basics of HTML, as well as the basics of related markup languages.

As the amount of information on your server grows, how you organize the various types of information becomes important. The tricks are to avoid duplication, provide easy file retrieval, and provide a suitable path for growth as your Internet server evolves. Yes, this requires more planning. (Sound familiar?) How you organize your server’s information so it is accessible, readable, useful, and easily maintainable is critical. Anyone can provide a server with little effort–even if it doesn’t appear so from what we’ve said; however, usability and value to the intended audience of the server require work.

The Web has advanced far enough that these tasks–creating Web pages and organizing your content–have been made much easier by improved software tools. For basic sites, you might still choose to use SimpleText to write Web pages from scratch or use Web and graphics editors and format converters to turn existing documents into Web pages. If you are going to provide sound and video, you will need tools for producing, editing, and browsing these formats. At the professional end of the spectrum, there are tools that also help you manage your files and keep track of your site’s organization.

Looking Ahead

Chapter 16: Future Web. Internet information servers involve rapidly changing technology, and you need to keep abreast of developments that may affect your server. I don’t claim to be a psychic who can predict the future, but some technologies have progressed to the point that they will be common components of Web servers in just a few years. This chapter will point out a few promising technologies to watch.

Appendices. At this point, you have just about everything you need to know to set up a fully featured Mac OS X Web server. The appendices will point you to some sources of information on Mac OS X and general Web development resources.