Amazon.co.uk Review
This guide briefly tours the Web and covers basic HTML, tables, forms and frames in a series of quick reads. (This discussion offers just enough information to jog the memory to proper HTML usage.) You get in-depth coverage of cascading style sheets (CSS), the Extensible Markup Language (XML), JavaScript, HTTP, CGI and Perl. Stephen Spainhour and Robert Eckstein explore CSS in brief but do cover the pending W3C standard. They also provide a refreshingly quick overview of XML. To present JavaScript, the book makes excellent use of diagrams to illustrate the object hierarchy and the way the language works with windows and frames.
Webmaster takes on a decidedly public-domain slant in its presentation of server configuration, primarily aimed at the freeware Apache server, and PHP, the freeware server-side scripting language. Even if you don't code with these tools, however, this book offers plenty of industry-standard reference. --Stephen Plain --This text refers to an out of print or unavailable edition of this title.
Bill Blinn, Technology Corner, Jan 25, 2003
Review
Product Description
First, there was HTML. Then along came JavaScript. Close on the heels of JavaScript came CSS and before you mastered that, along came XML. Behind every successful web page is an overworked and underappreciated webmaster with a big pile of books about various web technologies spilling out across their desk.
That collection of books is a valuable resource for delving into the topics at depth (and at leisure). But when you need an answer fast, the dog-eared book you'll turn to again and again is the new third edition of Webmaster in a Nutshell.
This concise and portable quick reference distills an immense amount of information on several languages and technologies into one compact reference book. This is one book that will pay for itself a thousand times over in time saved and increased productivity.
Webmaster in a Nutshell puts a fast-paced introduction, detailed reference section, and quick reference guide to each technology all within easy reach. It's packed full of the genuinely useful information a webmaster needs daily, whatever the technology, including:
- HTML
- CSS
- XML
- CGI
- JavaScript
- HTTP
- PHP
- Apache
About the Author
Robert Eckstein, an editor at O'Reilly, works mostly on Java books (notably Java Swing) and is also responsible for the XML Pocket Reference and Webmaster in a Nutshell, 2nd Edition. In his spare time he has been known to provide online coverage for popular conferences. He also writes articles for JavaWorld magazine. Robert holds bachelor's degrees in computer science and communications from Trinity University. In the past, he has worked for the USAA insurance company and more recently spent four years with Motorola's cellular software division. He is the co-author of Using Samba.
Stephen Spainhour co-authored Webmaster in a Nutshell, Perl in a Nutshell, 1st Edition, and contributed to many other OReilly titles. He is an avid fan of professional tennis, and when hes not checking for tennis scores on the Web, he enjoys cooking, electronic music, troubleshooting his home-built PC, and watching too much television.
Excerpted from Webmaster in a Nutshell by Stephen Spainhour, Robert Eckstein. Copyright © 2003. Reprinted by permission. All rights reserved.
The Apache HTTP Server is the most widely used web server on the Internet. The Apache server was developed from an early version of the original NCSA server with the intent of providing further improvement while maintaining compatibility. Since then, all development efforts on the NCSA server have ceased.
Apache has since earned the title of reigning king among web servers, and it isnt hard to see why:the base distribution is fast, free,and full-featured. It runs on many different platforms and has a multitude of third-party modules available to expand its functionality.
This chapter covers Version 2.0 of the Apache server.Most of the configuration and module functionality are similar to the last major release,1.3, which is still in wide use. Major differences between the versions will be noted.
Understanding Apache
The Apache distribution consists of the source for the core binary, httpd, the standard set of modules, and numerous additional header and configuration files. You can compile the server for your particular architecture and preferences using the config-make-make install routing common to building open source software. The latest version of gcc or another up-to-date ANSI C compiler is required to compile and build Apache.
However, you may not have to compile Apache from source. Most Linux and Mac OS X distributions have Apache already built-in. Furthermore, binaries are available for most popular platforms.
By itself, httpd doesnt do more than listen for requests and deliver files as is. Apache is designed to load special modules to implement additional functionality. These modules define much of the behavior of the Apache server. A set of standard modules is distributed with the server, including a set of core modules that is automatically compiled into the server binary. Apache will call on modules as needed to perform a dedicated task, such as user authentication or database queries.
Loading Modules
Modules must be compiled first to be used by the server, and can be loaded in two ways:statically or dynamically. Modules can be statically built directly into the server binary at compile time:
./configure --enable-module
./configure --disable-base_module
./configure --enable-modules=module_list
Alternatively, you can compile modules as DSOs (Dynamically Shared Objects) and load them as needed at run-time (when the server is started or restarted) by identifying them with the LoadModule directive in the configuration file.
To compile shared modules at compile time, use:
./configure --enable-MODULE =shared
DSO modules may also be compiled with apxs (Apache Extension Tool) at any time outside of the Apache source tree. See the Apache documentation for full details on apxs.
Server Configuration
At startup, Apache reads the main server configuration file httpd.conf. You can control the behavior of the server and its modules by inserting or modifying the directives within this file. Additional configuration can occur on a directory-specific level using .htaccess files. These are configuration files like httpd.conf, but the directives they contain apply only to the directory where they reside. This allows for delegation of control over separate content areas of a single server, and may simplify server management.
The Apache server uses one other configuration file, mime.types, to determine what MIME types should be associated with what file suffixes (see Chapter 17).
The configuration files contain directives, which are one-line commands that tell the server what to do. In addition to the directives themselves, the configuration files may contain any number of blank lines or comment lines beginning with a hash mark (#). Although directive names are not case-sensitive,we use the case conventions in the default files. Example copies of each of these files are included with the server software distribution, which you can refer to for more information.
The first things Apache needs from the configuration file are basics like the listening port, server name, the default locations for content, logs, and other important files, and what modules to load. After that, the wider server functionality is configured. This includes access control, virtual hosts, special resource handling,and module-specific directives.
Here are some basic directives you might find in the httpd.conf configuration file:
ServerType standalone
Port 80
ServerAdmin webmaster@oreilly.com
ServerName webnuts.oreilly.com
User nobody
Group nobody
Each directive here specifies a property of the servers configuration and binds it to a default setting or value.Since these directives exist on their own in the configuration file, their context is that of the whole server. Many directives will appear in special subsections that limit their scope. Directives that define subsections are bracketed, XML-like elements. For example:
Deny From All
This configuration section sets a directive for requests to a single directory/docs.
Many configuration sections apply to locations of file on the server, such as , , and . Other configuration sections define virtual servers () or contain directives specific to a module ()
All server configuration can occur in the httpd.conf file, but you may want to allow special configuration of only certain parts of your server you could let a user configure some aspects of how documents in her directory are served. By default, Apache looks for .htaccess files in every directory it serves a file from. .htaccess may contain any configuration directives allowed by the server configuration file with the AllowOverride directive. For example, if httpd.conf contained the line:
AllowOverride AuthConfig
most of the directives from the user authorization modules (Auth*) could be used in an .htaccess file to limit access to the files in that directory. This is exactly equivalent to using the same directives within a specified section in
httpd.conf .
Since .htaccess files affect the directory they are in and any subdirectories, they have a cascading affect on configuration. A directive in a lower-level .htaccess requires an AllowOverride from a parent-level .htaccess to work. This places increased load on the server, which must search for .htaccess files and parse them for every request in the current and parent-level directories. If you want to completely ignore .htaccess files,use AllowOverride None in httpd.conf .