Roxen WebServer 2.2

by Pawel Leszek

The Roxen WebServer, from the Swedish company Roxen Internet Software, is a viable alternative for those who find Apache inappropriate for their needs. Although Apache dominates the internet web server market, it has some weak points: it lacks a built-in SQL database backend, flexible administration tools and easy SSL certificate management. All of these features can be found, however, in the Roxen WebServer. In fact, Roxen includes so many additional features that it seems more like an application server than an ordinary web server.

Roxen WebServer 2.2

Best of all is that the Roxen WebServer is open-source software covered by the GPL license, and it is free for both personal and commercial purposes. In addition, Roxen Internet Software offers service-support contracts, training and consulting services for those who need commercial assistance.

Getting Started

Roxen WebServer 2.2 is available as a free download for many platforms: FreeBSD 4.0, HPUX 11, Linux (libc6), Solaris 7 SPARC, Solaris 7 x86, Windows NT 4.0, Mac OS X and Darwin (PowerPC version). Source code is also available should you prefer to compile it yourself. First of all, you need to remember that two versions of the Roxen WebServer are available for download. One has LZW algorithm support that is able to encode and decode the GIF and TIFF image formats, and the other version does not. (The LZW algorithm is patented by Unisys in the US and Canada but not in Europe). Regardless of LZW support, both Roxen versions include 128-bit encryption algorithms, and it can be imported legally from Sweden because, starting July 1, 2001, the export of strong cryptography from Sweden is allowed to all countries currently connected to the Internet. I tested the Roxen WebServer on Red Hat 6.2, my preferred Linux distribution for servers.

Roxen comes in one big file as a self-extracting shell script, and it installs quickly and easily. The installer asks for basic information, such as the installation directory, the server name and the password for administrative interface. It also searches for the Java 2 SDK installation and Informix, Oracle or Sybase servers. In fact, Roxen WebServer consists of three main parts, the web server itself, the Pike scripting language interpreter and a wrapped MySQL server. You can start Roxen manually (using the start script inside the installation directory). If you want to start it automatically during system bootup, then you'll need to copy the init.d_roxen script from'/roxen/server/tools (in Roxen's installation directory) to /etc/rc.d/init.d. Don't forget to make the appropriate symbolic links to runlevel directories. We are now ready to play with the Roxen web interface.

Roxen WebServer 2.2

Web Administration Interface

Roxen's main advantage over Apache (and others) is it features an integrated management interface that is tightly integrated into web server itself. This interface can be accessed from any web browser. As you can see from the figures, the administrative interface is really impressive--powerful and well designed. I would like to see something similar available for Apache. On the other hand, using the administrative interface is the only way to control your server. The whole configuration is stored in text files, but it is hard to edit them by hand because they are encoded by XML. This is one reason why Apache administrators may find it hard to manage Roxen from the web browser.

If you want use this interface you need to log on using the administrator's username and password (defined during installation) on http://yourserver:13123--the default TCP port for communication with Roxen WebServer--you will be able to change it later. Remember that this connection isn't secured in any way. Administrative interfaces should use the SSL secure connection (HTTPS). However, you will need to create certificates and configure it yourself.

The web interface is split into many tabs, each covering a specific subset of server administration features. There are five main tabs for administrative tasks:

  • Admin - administrative settings like passwords and login names,

  • Sites - managing virtual sites (here you can configure modules for each virtual site),

  • Globals - global settings for Roxen WebServer,

  • Tasks - configuring a basic webserver tasks,

  • DBs - internal MySQL database management and

  • Docs - Roxen documentation

Each of these tabs splits into a few other sections that are logically categorized. Most configuration settings include links to appropriate help topics. It is good to remember that, by default, the Roxen WebServer sends all of its pages encoded in UTF 8, a common Unicode encoding that makes the pages easy to transfer to the Japanese, Chinese, Vietnamese or Korean languages. Of course, you can switch the setting to the ISO encoding standard.

The first step in configuring a new server is to create a test virtual site. Remember that you can create many administrative users and give them limited privileges for administering selected virtual sites or the entire Roxen WebServer itself.

Modules, Modules, Modules

The Roxen WebServer is highly modular, much more so than Apache. In fact, Roxen sometimes needs a couple of modules to do the simplest task. Many preconfigured modules are included that you can enable, disable and setup from the administrative interface. Roxen modules also can be added on the fly, as opposed to Apache modules. It is also much easier to write your own module for Roxen than it is for Apache. The module writer can concentrate on the actual functions in her module because the Roxen WebServer provides frameworks such as the user interface and I/O operations. This approach also ensures the same user interface, and each virtual site can use its own subset of modules. Roxen modules can be written in Pike or Java.

Database Support

The Roxen WebServer includes a generic database API (accessible through the Pike interpreter), which is used to connect to a different SQL databases. Pike includes native drivers for Oracle 7/8, (you will need to install OCI, Oracle Client Libraries though), Sybase, Informix, MySQL, Postgres and ODBC data sources. You can use the administrative interface to test database connections or to run SQL queries, to browse tables or to perform any other administrative actions for the database engine.

Roxen WebServer 2.2

More interesting is that the Roxen WebServer includes a wrapped MySQL server and uses it for storing the system configuration, usernames, passwords, images and help documents. This MySQL sever can be administered entirely through the Roxen web interface as well. Roxen also includes (available through the web interface) for backing up and restoring its internal databases. The internal web server data can be replicated with a shared MySQL database, an excellent idea because it enables many Roxen servers to share the same configuration data, all stored in a single MySQL database.

Scripting with Roxen

There are several ways to run scripts in Roxen, and it supports such standards as CGI, FastCGI and SSI. In addition, a built-in macro language RXML(Roxen Macro Language) is also provided. Most popular language scripts can cooperate with Roxen, however, most of them only as CGI scripts. Of course, the most important thing for most web developers is the question of PHP support. In answer, Roxen lacks native PHP support, but there is an experimental module for embedded PHP. The only officially supported mode of running PHP with Roxen is the old-fashioned way, running PHP scripts as CGI scripts.

Let's move on to Perl. The included Perl module provides support for both Perl scripts and Perl tags inside HTML code. In both cases, the actual Perl code is executed in a subprocess and not in the main Roxen process. The module will catch requests to documents whose path ends with any of the suffixes indicated by the extensions setting in the Perl module configuration. The defaults are .perl and .pl. Perl tags, or processing instructions, will be available if the module setting Enable Perl tag is set to Yes. This means that RXML (see below) pages can use Perl code that looks like:

<?perl print scalar(localtime), "\n"; ?>'

The Perl module also optionally provides a <perl></perl> container for embedding Perl code directly inside static HTML.

Roxen also includes its own scripting extension RXML (Roxen Macro Language); it is called a scripting language, but it's not a full featured language. RXML simply adds a new subset of tags to commonly used HTML tags, and it is similar to XML when you look at its tags and entity-based syntax. The really usable RXML feature is that it can be extended with new tags, by writing new modules or creating wrapper tags.

RXML is simple enough to be used by web designers that do not know programming. The common example for RXML power is the If tag, which makes it possible to create dynamic pages based on conditions. RXML makes it easy to have page optimization for different web browsers and screen resolutions or to limit access to pages that can be viewed only by authenticated users.

Java Support

The Roxen WebServer includes a Java servlet bridge module, which is its interface to Java servlets. To have Java support loaded, the Roxen installer must find a Java 2.0 SDK-compliant virtual machine during installation. Unfortunately I've had trouble using my favorite Java VM, IBM's Java Develop Kit for Linux 1.3.0, with Roxen. I was unable to configure the Java servlet bridge due to compilation errors. In theory, a Java servlet is installed by adding a copy of the Java servlet bridge module. Java modules are just .class files or .jar files within the normal module directories and behave in the same way as do Pike modules. Roxen documentation includes a detailed instruction for setting this all up and examples of how to do it.

Pike Language

The Roxen WebServer comes with its own, universal scripting language, Pike. The Pike language is an interpreted, object-oriented language that looks like simplified C/C++. The Pike 7.2 interpreter is included with the Roxen WebServer 2.2, and it is also distributed under the GPL. What's more, Roxen WebServer itself is written in Pike. The Pike interpreter includes all of the functions and libraries that are necessary to access all of Roxen's functions (i.e., the database API). You can also use Pike inside web pages as tags or standalone scripts. Here is an example Pike script for creating a database with Pike; it resembles the Perl DBI.

void create_new_database(string test)
{
mixed error;
object db = Sql.sql("mysql://admin:password@10.10.10.7/");
error = catch {
db->create_db("test");
};
if(error)
{
werror("Error: "+db->error()+"\n");
return;
}
}
Bells and Whistles

Roxen comes with many handy features intended for administrators and developers. The first of them is a built-in update system that will periodically contact update servers at Roxen Internet Software over the Internet. I'm not very excited by that feature, and I don't want to allow automatic (i.e., that is, out of your control) updates of any software on my production servers. I will do that manually, thank you.

Two interesting features are included that are intended to ensure web server availability. ABS is the anti-block system that restarts the web server in case it locks up and doesn't respond in a reasonable amount of time (you can precisely define that "reasonable time"). Auto Restart restarts Roxen on a selected schedule to free memory or file resources that Roxen is otherwise unable to free.

Roxen WebServer 2.2

Another useful feature is the data cache that is used to cache static pages that are often accessed. The RXML parser figures out whether a page is static or not by letting each tag tell whether it can be cached or not. The "throttling" feature is also useful. It is a module that interprets a special tag subset inside HTML code, making it possible to limit the bandwidth given to each site and even to each request.

There are also five on-the-fly graphic generation modules that I really liked. First is GButton, which provides a tag that is used to draw graphical buttons. The second is Graphic text, and it uses the FreeType library to generate elegant rendered graphical text. Now you can use your favorite fonts, and all graphical web browsers will display them in the same way. The third module is the Image converter, which provides a tag that can be used to convert images from one format to another. Tab list is the fourth module, and it is a tag used to draw tab lists. The last module, but certainly not the least, is the business graphics module (providing the diagram tag) that allows Roxen to build different kinds of diagrams on the fly.

In addition to all of this, Roxen includes integrated SSL configuration and certificate management. You can generate certificate requests or self-signed SSL certificates that can be used as root certificates for generating client's certificates. All operations can be performed from the administrative web interface.

One final thing: Roxen includes excellent documentation that is, again, accessible through the web interface. It is divided into three parts, each is written from another point of view--administrator, programmer and web designer.

Product Information

Manufacturer: Roxen Internet SoftwareE-Mail: info@roxen.comURL: www.roxen.comPrice: GPL. Free for commercial and personal usage. Commercial support and training are available.

The Good
  • Open-source product

  • Excellent administrative interface

  • Easy virtual sites deployment

  • MySQL database backend integrated with webserver

  • Many built-in extensions like graphic text rendering

  • Replication of web server data to a shared MySQL database

The Bad
  • Poor PHP support

  • Unencrypted administrative connections

  • No cluster or load balancing features

  • No alternative for administrative web interface

Pawel Leszek is a freelance writer and consultant specializing in Linux, Mac OS X/Darwin and groupware solutions. He has used Linux since 1995.

Load Disqus comments

Firstwave Cloud