NOTE
In your configuration files (or in
.htaccess), you can specify Options
IncludesNOEXEC to disallow the exec directive because this is the least secure of the
SSI directives. Be especially cautious when web users are able to create content (such
as a guest book or discussion board) and these options are enabled!
The variables whose attributes have been set by
var and value can also be used elsewhere
with some of the following directives.
Flow Control
Using the variables set with the set directive and the various environment and include
variables, a limited flow control syntax can be used to generate a certain amount of
dynamic content on server-parsed pages.
The syntax of the
if/else functions is as follows:
<!--#if expr=”test_condition” -->
<!--#elif expr=”test_condition” -->
<!--#else -->
<!--#endif -->
expr can be a string, which is considered true if nonempty, or a variety of comparisons
between two strings. Available comparison operators are
=, !=, <, <=, >, and >=. If the
second string has the format
/string/, the strings are compared with regular expressions.
Multiple comparisons can be strung together with
&& (AND) and || (OR). Any text appear-
ing between the
if/elif/else directives are displayed on the resulting page. An example
of such a flow structure follows:
<!--#set var=”agent” value=”$HTTP_USER_AGENT” -->
<!--#if expr=”$agent = /Mozilla/” -->
Mozilla!
<!--#else -->
Something else!
<!--#endif -->
This code displays Mozilla! if you’re using a browser that passes Mozilla as part of its
USER_AGENT string, and it displays Something else! otherwise.
Other Web Servers for Use with Ubuntu
To determine the best web server for your use, consider the needs of the website you
manage. Does it need heavy security (for e-commerce), multimedia (music, video, and
pictures), or the capability to download files easily? How much are you willing to spend
for the software? Do you need software that is easy to maintain and troubleshoot or that
CHAPTER 20 Apache Web Server Management
478
includes tech support? The answers to these questions might steer you to something
other than Apache.
The following sections list some of the more popular alternatives to using Apache as your
web server.
Sun ONE Web Server
Despite the Netcraft numbers shown previously in Table 20.1, there is evidence that the
Sun Java System Web Server (formerly known as the iPlanet Web Server, and subsequently
Sun ONE Web Server) might be even more popular than Apache in strictly corporate
arenas. The server got its start as the Netscape Enterprise Server—one of the first powerful
web servers ever to hit the market. Sun ONE Web Server comes in many flavors, and all of
them are big. In addition to the enterprise-level web server that can be run on Ubuntu,
the software features application, messaging, calendar, and directory servers—just to name
a few.
Sun ONE Web Server is great for handling big web needs, and it comes with an appropri-
ately big price tag. It’s definitely not something to run the school website—unless your
school happens to be a major state university with several regional campuses. For more
information on Sun Java System Web Server, you can visit its website (http://wwws.
sun.com/software/products/web_srvr/home_web_srvr.html).
Zope
Zope is another open-source web server. Although it is still relatively young and might
not have as much flexibility as Apache, it is making strong inroads in the web server
market.
What makes Zope different from Apache is the fact that it is managed through a
completely web-based graphic interface. This has broad appeal for those who are not
enthused about a command-line–only interface.
Zope is a product of the Zope Corporation (formerly Digital Creations), the same firm that
made the Python programming language. And, like all things open source, it is free.
Information on Zope can be found at both http://www.zope.com (for the commercial
version) and http://www.zope.org (for the open-source version).
Zeus Web Server
Ubuntu sites can also use the Zeus Web Server from Zeus Technology. This server offers a
scalable SSL implementation, security settings across multiple websites, and an online
administration server. The current price is $1,700 for a host platform with up to two
CPUs, but load balancing via the Zeus Load Balancer costs $12,000 (at the time of writing)
for each pair of load-balancing computers.
You can get more information about the Zeus Web Server at http://www.zeus.com/
products/zws/.
Other Web Servers for Use with Ubuntu
479
20

Get Ubuntu Unleashed, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.