First Start Guide

If you start WWW Server for the first time, the window you see on the left is displayed. To start serving your webpage, perform these steps:

  • Click the folder icon and select the folder containing your webpages.
  • Click the blue link.

    It's as easy as that! The next time you start the server you will not see this initial startup screen, so to start it in that case, you'll need to press the "Start Server" button.

    Using virtual folders

    Probably you want to change the server settings somewhen, most likely to share an extra folder or just a different folder. In that case, you need to know how to use the virtual folder tab.

    When you click the tab "Folders", you see a list with all folders you are currently serving. The left part displays the URL by which it can be accessed, the right part shows the local folder mapped to that URL. Clicking a folder once will select it, so you can change its properties. Double-clicking will open it in the Explorer.

    When you select a virtual folder, you can change its properties. "Remote name" indicates URL to which the folder is mapped. Port is the port number on which the folder can be accessed, * meaning all ports. Local name is the local filename of the folder being shared. If you change any properties, click "Update" to activate your changes.

    Note: in Compieuw the all ports setting will change to port number 0 instead of *.

    You can make multiple virtual folders. To add one, make sure no folder is currently selected, enter the properties of the new folder and click "Add". To remove a virtual folder, select it and press "Remove".

    With the arrow buttons, you can re-order the folder list. This can be important if more than one file is mapped to a certain URL, because more than one virtual folder has the same file. In that case, the last one in the list is preferred above the others.

    Using access control

    WWWServer supports IP-based access control. The concept is similar to that of virtual folders. However, here you enter IP Masks. An IP Mask is an IPv4 address, where you can leave an "x" instead of a number as a wildcard. The address should be preceded by "+" to allow access or "-" to deny.

    Again, the list is read from top to bottom. That means that -x.x.x.x first and then + will disallow anybody except the local host. When no rule applies to a certain host, it is blocked.

    File caching in Roepvooruit

    WWWServer supports intelligent file caching. This means that files are not always read from disk, but kept in memory if possible. This to speed up operation: when a file is requested two or more times either in parallel or after eachother, the file only needs to be read once. The cache is not configurabe and works as following.

    When requesting a file, WWWServer looks up the amount of free physical memory. If that is not enough to hold the file, the largest file is thrown out of the cache. Then, the requested file is added to the cache.

    Note: Compieuw will have an improved cache memory manager: it will only look up free space once, at server start. Then it will try to use not more memory than that. When a file is larger than the cache size, the cache is enlarged to make it fit.


    Managing plugins

    Installing any plugin is very easy: you just extract the plugin and put it in the WWW directory. When you start WWW, it will automatically detect and load the new plugin.

    You can also add plugins to a running server. Then you will need to use the plugin manager: you first place the plugin into the WWW directory, open the plugin manager and select "Reload All".

    You can also configure plugins. To do this, open the plugin manager, click the plugin to reconfigure and finally click the button "Configure the selected plugin". Most plugins will then present their configuration file using Notepad. Make your changes, save them and then click "Reload All" to reload the plugins - using the changed settings.

    Maybe you want different settings with a particular plugin for different filetypes. This is possible. You can just duplicate the plugin file and you have two plugins that you can configure independent from eachother.

    Using the WWW NT Service

    You might want to have the server always running, no matter who is logged in, no matter if anybody is logged in. This is possible by using the NT Service version of WWW.

    To start using it, just go to the command line and type:

    www_ntservice -install
    net start www

    This will install the service and start it.

    To change the configuration of the NT service, you can use the GUI application. Any change you make with the latter, will immediately and automatically be taken over by the service. You should not press the "Start Server" button as that will only produce an error message.

    Important: changing the port settings in this way will not work on Compieuw beta 1 and below.

    Version numbering

    Version numbers of WWWServer consist of either only a name or a name followed by a dot and a number. The idea behind this, is that servers and plugins having the same name are binary compatible with eachother, the number only indicating minor revisions.

    This means the server and the plugins should all have the same name, but do not need to have the same minor version number. At this moment, for example, the recommended configuration is a Roepvooruit.2 server, a Roepvooruit.1 PHP plugin and a Roepvooruit SSI plugin.

    Important: mixing names can work. For example, a Verwerking server might accept the Elsjeu PHP plugin. Do not count on this, however, as until the Compieuw server is released, using wrong plugins can lead to errors and crashes.

    Development: Compieuw

    Compieuw is the name for the next version of WWWServer. It will have a completely redesigned plugin architecture, allowing for cleaner and simpler code, better memory management and increased functionality.

    The plugins will finally have versioning information. That means that the server will automatically reject plugins that are not compatible anymore. Note that versions are stored in the plugin, making it possible for servers to maintain backward compatibility.

    The Smart Memory Manager will also be improved, so that it will almost never start using virtual memory anymore.

    Maybe Compieuw will finally support cookies for PHP!

    Update (9-4-2004): Also, I discovered many memory leaks in all previous versions of WWWServer. Solving these in the old codebase would be almost impossible. Therefore, I decided to re-organize and in some respects rewrite the backend code of the server. The result is there: Compieuw beta 2 already builds on this new core, even though you can't see it anywhere on the outside. Well, except from the memory usage, of course.

    Cookie support is still to be added, but the cookie interface is not really well documented, I believe. Logo