Abyssws Win
Abyssws Win
Abyssws Win
®
For Windows
Abyss Web Server For Windows User’s Guide
Copyright © 2001-2017 by Aprelium
Revision History
Revision 1.0.0 February 20, 2002
DISCLAIMER OF WARRANTIES
Aprelium makes no representations or warranties, either express or implied, by or with respect to anything in
this guide, and shall not be liable for any warranties of merchantability or fitness for a particular purpose or
for any indirect, special or consequential damages.
LICENSE NOTES
No part of this guide may be reproduced, stored in a retrieval system or transmitted, in any form or by any
means, photocopying, recording, or otherwise, without prior written consent of Aprelium. No patent liability
is assumed with respect to the use of the information contained herein.
While every precaution has been taken in the preparation of this guide, Aprelium assumes no responsibility
for errors or omissions. This guide and features described herein are subject to change without notice.
TRADEMARKS
Aprelium and The Aprelium logo are registered trademarks and Abyss Web Server is a trademark of
Aprelium SARL.
Other products or brand names are trademarks or registered trademarks of their respective holders.
CONTACT INFORMATION
Web Site http://www.aprelium.com
Technical support http://www.aprelium.com/support
General inquiries http://www.aprelium.com/contact.html
Table of Contents
Before You Begin..................................................................................................... vii
System requirements ....................................................................................... vii
Alternative formats.......................................................................................... vii
What you should know................................................................................... vii
Chapter quick reference .................................................................................. vii
Conventions used in this guide .................................................................... viii
Typographical conventions ................................................................... viii
Terminology ............................................................................................. viii
1. Introduction ............................................................................................................ 1
What is Abyss Web Server? ............................................................................... 1
How do web servers work?............................................................................... 1
2. Getting Started ....................................................................................................... 3
Getting the software ........................................................................................... 3
Installing/Upgrading the software .................................................................. 3
First contact.......................................................................................................... 3
Setting up a web site........................................................................................... 6
Shutting down the server................................................................................... 6
Asking for support.............................................................................................. 7
3. Using The Console................................................................................................. 8
What is the console? ........................................................................................... 8
Accessing the console ......................................................................................... 8
Console interface basics ..................................................................................... 9
Help buttons ................................................................................................ 9
Tables ............................................................................................................ 9
Applying configuration changes .............................................................. 9
Console Configuration ..................................................................................... 10
Changing the console port and protocol ............................................... 10
Changing the console access credentials ............................................... 11
Changing the language ............................................................................ 12
Controlling the access to the console ..................................................... 13
4. Server Management............................................................................................. 15
Overview ............................................................................................................ 15
Server Statistics.................................................................................................. 15
Server Activity................................................................................................... 16
General server configuration........................................................................... 17
Parameters.................................................................................................. 17
MIME Types............................................................................................... 19
Global Bandwidth Limits......................................................................... 20
Anti-Hacking Protection .......................................................................... 21
Logging Parameters.................................................................................. 23
SSL/TLS Certificates......................................................................................... 23
Overview .................................................................................................... 24
Generating a private key.......................................................................... 25
iv
Importing a private key ........................................................................... 25
Generating a CSR ...................................................................................... 25
Adding a signed certificate...................................................................... 27
Creating a self-signed certificate............................................................. 27
5. Hosts Management .............................................................................................. 29
Overview ............................................................................................................ 29
Declaring a new host ........................................................................................ 29
Configuring a host ............................................................................................ 30
General........................................................................................................ 31
Index Files .................................................................................................. 34
Directory Listing ....................................................................................... 35
Aliases......................................................................................................... 37
XSSI Parameters ........................................................................................ 38
Users and Groups ..................................................................................... 39
Custom Error Pages .................................................................................. 40
Scripting Parameters................................................................................. 41
ASP.NET Parameters ................................................................................ 46
Access Control ........................................................................................... 49
IP Address Control ................................................................................... 50
URL Rewriting........................................................................................... 52
Compression .............................................................................................. 56
Bandwidth Limits ..................................................................................... 57
Logging....................................................................................................... 58
Reverse Proxy ............................................................................................ 60
Restricted Downloads Areas ................................................................... 61
Anti-Leeching ............................................................................................ 63
Statistics ...................................................................................................... 64
6. CGI, FastCGI, and ISAPI.................................................................................... 66
Setting up an interpreter .................................................................................. 66
How are they run? ............................................................................................ 66
CGI environment variables.............................................................................. 67
FastCGI ............................................................................................................... 72
ISAPI Extensions ............................................................................................... 72
X-Sendfile Support............................................................................................ 72
7. eXtended Server Side Includes ......................................................................... 74
What are XSSI? .................................................................................................. 74
XSSI Syntax ........................................................................................................ 74
Attribute Values ................................................................................................ 74
Character Escaping ................................................................................... 74
Variables Expansion.................................................................................. 74
Directives............................................................................................................ 75
#config......................................................................................................... 75
#echo ........................................................................................................... 76
#exec............................................................................................................ 77
#flastmod .................................................................................................... 77
v
#fsize ........................................................................................................... 78
#include ...................................................................................................... 78
#printenv .................................................................................................... 78
#set............................................................................................................... 78
Conditional blocks ............................................................................................ 79
Syntax ......................................................................................................... 79
Expression evaluation .............................................................................. 79
Encoding............................................................................................................. 80
8. Custom Directory Listings ................................................................................. 82
Defining a template .......................................................................................... 82
Scripts ................................................................................................................. 84
Glossary ..................................................................................................................... 86
A. Command Line Parameters............................................................................... 88
B. Startup Configuration......................................................................................... 89
C. IP Addresses and Ranges Format..................................................................... 90
IPv4 Addresses and Ranges ............................................................................ 90
IPv6 Addresses and Ranges ............................................................................ 90
D. Patterns Format ................................................................................................... 92
E. Regular Expressions............................................................................................ 93
F. Uninstalling The Software................................................................................. 95
G. Solving Ports Listening Problems ................................................................... 96
H. Troubleshooting Guide ..................................................................................... 97
vi
Before You Begin
System requirements
Abyss Web Server is a multiplatform software designed for Microsoft
Windows 95, 98, Millennium Edition (ME), as well as all editions of NT 3.51,
NT 4.0, 2000, XP, 2003, Vista, 7, 2008, 8, 8.1, 2012, 2016 and 10; Mac OS
X/macOS 10.2 and higher; and Linux (Kernel 2.4 and higher) systems. It is
compatible with both 32 and 64-bit architectures and operating systems.
This guide documents the Windows version. Abyss Web Server for Windows
minimum requirements are:
Alternative formats
This guide exists in several formats: Online HTML, Offline HTML, and PDF.
For more information, browse the documentation section at
http://www.aprelium.com/abyssws.
vii
Before You Begin
viii
Before You Begin
Terminology
Your computer
The computer on which Abyss Web Server is installed.
The server
The instance of Abyss Web Server under execution.
The browser
The web browser you use.
The console
The web configuration interface of Abyss Web Server.
The network
The network to which your computer is connected. It can be:
• A single computer network if you are not physically connected to any
network and your computer is alone.
• A LAN (Local Area Network).
• The Internet
ix
Chapter 1. Introduction
• Abyss Web Server X1: Free personal edition. It is a fully functional software
with no limitations, no nag screens, no spyware, and no advertisements.
• Abyss Web Server X2: Professional edition. It is suitable for demanding
users and medium to high loaded web sites. It supports virtual hosting,
dual hosts (HTTP+HTTPS), and advanced features. For more information,
visit http://www.aprelium.com/abyssws/x2
For additional information about both editions and a comparison between
their feature set, browse http://www.aprelium.com/abyssws.
• http://: This part indicates that the document you want to access can be
retrieved from web server, which understands the HTTP protocol. The
HTTP protocol is a standardized language of communication between
browsers and web servers.
• www.aprelium.com: This is the host name of the computer from which
the document can be downloaded.
• /doc/sample.html: This is the virtual path of the document in the
www.aprelium.com’s web server.
Then, the browser contacts a DNS (Domain Name Server) to know the IP
address of the computer which full qualified domain name is
www.aprelium.com. The domain name server is usually run by your ISP or
by your company.
1
Chapter 1. Introduction
The browser establishes a connection channel with the web server on the
computer which IP address was given by the DNS server and requests the
document on the host which name is www.aprelium.com and which virtual
path is doc/sample.html. The browser has to specify in the request the host
name because many modern web servers (including Abyss Web Server) have
the ability to serve more than a one host from a single computer with a single
IP address only. This is called virtual hosting. In such a case, the IP address of
this computer is associated with more than one domain name.
The server decodes the request and maps the virtual path to a real one, which
should match an existing file. The server sends the file to the browser with
some useful information such as its last modification time and its MIME type.
The MIME type helps the browser decide how to display the received
document. In our example, it is a HTML file. So the server sets its MIME type
to text/html and the browser understands that it must render it as text.
Sometimes you enter a URL without an explicit filename such as
http://www.aprelium.com/doc. The browser sends the request to the
web server as in the previous example. The server detects that the virtual path
maps to a directory and not to a file. It searches then in this directory an index
file. Index files are usually named index.html or index.htm. If it finds for
example index.html, it acts as if the requested URL was
http://www.aprelium.com/doc/index.html. If no index file is found,
the web server generates a listing of the directory contents and sends it to the
browser or reports an error.
2
Chapter 2. Getting Started
• Open the directory where you have saved the software package.
• Double-click on the software package icon.
• If an old version of Abyss Web Server is already installed on your computer,
you may be asked to uninstall it. All you have to do is to follow the
on-screen instructions. IMPORTANT NOTICE: When the uninstaller asks you
to confirm the deletion of the installation directory, select No.
• Read carefully the license agreement. If you agree with it, press I Agree. If
you do not, press Cancel and delete Abyss Web Server package from your
computer.
• Deselect components you do not want to install. Auto Start enables Abyss
Web Server auto starting when a Windows session starts. Start Menu
Shortcuts enables adding Abyss Web Server shortcuts in the Start Menu.
Documentation installs help files.
• Press Next.
• Choose a directory where you want to install Abyss Web Server files. From
now on, <Abyss Web Server directory> will refer to this directory.
• Press Install.
After installing, you will be asked if you want to launch Abyss Web Server. If
you press No, you should press Close to close the setup program.
3
Chapter 2. Getting Started
First contact
If Abyss Web Server is not running, open the Start menu, choose Programs,
then Abyss Web Server and select Abyss Web Server. You can also open the
directory where you have installed it and double-click on the abyssws.exe or
abyssws icon.
4
Chapter 2. Getting Started
5
Chapter 2. Getting Started
6
Chapter 2. Getting Started
7
Chapter 3. Using The Console
8
Chapter 3. Using The Console
Help buttons
A small tip is displayed when you put the mouse cursor on a help button .
Pressing it displays the related documentation topic.
Note: Not all the browsers support displaying tips.
Tables
Each line of a table contains a pen button and a wastebin button . Press the
pen button on a line to display a dialog where you can modify its contents or
press the wastebin button to delete it. Pressing Add displays a dialog where
you can enter the contents of a new line.
9
Chapter 3. Using The Console
Console Configuration
To change the console parameters, open the console and select Console
Configuration.
10
Chapter 3. Using The Console
11
Chapter 3. Using The Console
12
Chapter 3. Using The Console
13
Chapter 3. Using The Console
• Order: The order that the server follows to check if access is granted to a
client based on its IP address. If it is set to Allow/Deny, access is denied by
default and is allowed only if the IP address is in the Allow for list and is
not in the Deny for list. If it is set to Deny/Allow, access is allowed by
default and is denied only if the IP address is in the Deny for list and is not
in the Allow for list.
• Allowed IP Addresses: The list of IP addresses and IP address ranges for
which access is allowed. Refer to "IP Addresses and Ranges Format"
appendix for more information about the IP addresses and ranges.
• Denied IP Addresses: The list of IP addresses and IP address ranges for
which access is denied. Refer to "IP Addresses and Ranges Format"
appendix for more information about the IP addresses and ranges.
Note: The access to the console is always allowed for the computer on which Abyss
Web Server runs (which IPv4 address is 127.0.0.1 and IPv6 address is ::1.)
Note: If Denied IP Addresses list is empty and the order is Deny/Allow, access is
granted to any IP address.
14
Chapter 4. Server Management
Overview
All the server management tasks can be accomplished using the console. In
this section, you will learn how to:
Server Statistics
Open the console and select Server Statistics. The console displays a dialog
containing a set of statistics on the server’s activity since the installation or the
last server statistics reset:
• Total Uptime: The total time during which the server was up.
• Uptime since Last Restart: The time during which the server was up since
the last start or restart.
• Total Hits: The total number of processed requests for all the hosts. It
includes also bad requests that were not targeting a specific host and that
resulted in an error.
• Compressed Hits: The number of processed requests that resulted in
compressed responses across all the hosts.
• Error Hits: The number of requests for which the server replied by an error.
• HTML Hits: The number of requests the server replied to by a document
which MIME type was text/html.
• Image Hits: The number of requests the server replied to by a document
which MIME type starts with image/.
• Not Modified Hits: The number of requests for which the server detected
that the requested document has not changed.
• Transferred Data: The total size of the payload sent by the server to the
clients.
15
Chapter 4. Server Management
• Compression Savings: The amount of data that was saved thanks to the
compressed responses sent by the server to the clients.
Server Activity
Open the console and select Server Activity. The console displays a dialog
listing the current active connections. For each connection, the following
properties are reported:
16
Chapter 4. Server Management
Parameters
Select Parameters in the Server Configuration dialog to display the server
parameters dialog.
17
Chapter 4. Server Management
• Server Root: The root path of the web server. By default, it is the directory
where Abyss Web Server executable is installed. It is used as the base path
for all relative real paths in the configuration.
• Timeout: How many seconds the server waits for an inactive connection
before closing it.
• Keep-Alive Requests: The maximum number of requests that can be
served over the same connection. Only HTTP/1.1 and some HTTP/1.0
compliant browsers can benefit from this feature.
• Maximum Simultaneous Requests: The maximum number of requests the
server can serve in parallel.
• Advanced Parameters: Press Edit... to access the advanced parameters
dialog. This dialog has the following fields:
• Maximum length of the HTTP request line: The maximum length in
bytes of the HTTP request line. Requests which do not respect this limit
are refused and a HTTP error 414 (Request-URI Too Long) is reported to
the client.
• Maximum length of the HTTP request headers: The maximum length in
bytes of all the HTTP request headers. Requests which exceed this limit
are refused and a HTTP error 413 (Request Entity Too Large) is reported
to the client.
18
Chapter 4. Server Management
MIME Types
When the server sends a document to a browser, it also sends its MIME type.
This information helps the browser to know what kind of file it is (HTML, ZIP,
JPEG image, etc. . . ) and what to do with it (display it, save it on the disk,
launch a configured application to read it, etc. . . ). Abyss Web Server comes
with a list of common MIME types used as a default.
A MIME Type has the format type/subtype and is associated to one or
more extensions separated by spaces.
19
Chapter 4. Server Management
20
Chapter 4. Server Management
Note: Abyss Web Server does always its best to deliver data to clients while respecting
the restrictions set on the bandwidth. For example, assume that Maximum Total
Bandwidth is set to 10 KB/s and Maximum Bandwidth Per IP Address to 4
KB/s. If there are 2 clients connecting from different IP addresses, the server allocates
to each of them a bandwidth of 4 KB/s. But if there are 5 clients, the server will
allocate to each of them only 2 KB/s.
Anti-Hacking Protection
Although Abyss Web Server is secure and has an integrated system to prevent
malicious accesses to the server, it was equipped with an automatic
21
Chapter 4. Server Management
anti-hacking protection system to detect clients that are trying to attack the
server and to ban them. This system improves the overall security, detects at
an early stage denial of service attacks, and saves the bandwidth that could be
wasted during attacks.
To configure the anti-hacking system, select Anti-Hacking Protection in the
Server Configuration dialog.
22
Chapter 4. Server Management
Logging Parameters
Beside the common log format and the combined log format, Abyss Web
Server offers the possibility to define custom logging formats that can be used
in the configuration of hosts. Select Logging Parameters in the Server
Configuration dialog and use the Custom Logging Formats table to edit,
remove or add custom logging formats definitions.
Each format is defined by its name and a list of fields it contains. Fields refer
to information from the requests, the responses, or the CGI variables. They can
also refer to general information (such as the date and time) or to static text
that is to be inserted in each log line.
SSL/TLS Certificates
Open the console and select SSL/TLS Configuration to display the SSL/TLS
certificates management interface. With it, you can:
23
Chapter 4. Server Management
Overview
SSL/TLS is a communication protocol which encrypts data exchanged
between the server and the client. It is used to transfer HTTP requests and
responses securely on the network in order to prevent spying or data sniffing.
To secure one of your hosts or the console with SSL, you first need to generate
a private key. A private key should never be disclosed as it is used to cipher
(i.e. encode) transferred data.
SSL/TLS requires also that the server makes its real identity available to the
client by sending a certificate as soon as a connection is established between
both of them. A certificate contains information about the certificate holder. If
you intend to host a business site or a site where sensitive data is expected to
be gathered or displayed, we strongly recommend that the certificate is signed
by an independent certification authority which will check the holder
information. A certificate that is not signed by a certification authority will
24
Chapter 4. Server Management
work but the visitors’ browsers will always display a warning message and
invite them to confirm that they trust your self-signed certificate.
To sign a certificate by a certification authority, you have to create a CSR
(Certificate Signing Request). A CSR is generated by choosing a private key
and by entering your information. Once the CSR generated, you will have to
send it to a certification authority which will do the necessary to check your
information and to generate a signed certificate. Note that only the CSR has to
be sent to the certification authority; the private key used to generate it should
never be sent to them. When you receive the signed certificate, all you have to
do is to enter it in Abyss Web Server console to start using it.
25
Chapter 4. Server Management
Generating a CSR
To obtain a certificate signed by a certification authority, press Generate in
front of Certificate Signing Request. In the displayed dialog, choose a private
key that the certificate will be based on. Next fill the listed fields with your
information. Note that you must enter accurate information as most
certification authorities will verify them before issuing the signed certificate.
Keep the Secure Hash Algorithm to its default unless instructed by your
certification authority to use a specific signature algorithm or need to
interoperate with old clients which only understand SHA1 (deprecated as of
2015 and planned to be phased out by most browsers by 2016.) Press OK
when you are done. The console will then display the CSR contents in a text
area. Depending on your certification authority, you may have to send it, copy
it in an online form, or put it in a text file and forward it to them. We strongly
recommend that you check with your certification authority about the best
way to provide them with the CSR.
26
Chapter 4. Server Management
Note: Some certification authorities may also support certificates with more than one
host name. To generate a CSR for such a certification authority, enter in the Host
name (Common Name) all the host names separated with spaces. For example, if a
certificate is to be associated with both test.example.com and
mail.example.com, enter test.example.com mail.example.com.
Note: Some certification authorities will ask you about your server type. This
information is mainly used for statistical purposes and makes no difference on the
final signed certificate they will deliver. If you do not find Abyss Web Server on their
list, select Other Web Server or Other. If no such choices are available, you can
select OpenSSL or OpenSSL-based server. Again if no such choices are available,
you can safely select Apache or ModSSL as our SSL/TLS implementation is based on
OpenSSL which is also used by Apache and ModSSL.
Note: Abyss Web Server accepts IDN (International Domain Names) in the Host
name (Common Name) field. It will recognize them and convert them to the proper
format for use inside a CSR.
27
Chapter 4. Server Management
28
Chapter 5. Hosts Management
Overview
The main console dialog contains a table listing all the declared hosts in the
server. Each line in this table is associated with a host and contains:
29
Chapter 5. Hosts Management
• Protocol: Set it to HTTP if the host will use normal non-secure connections.
If you want to have the host serve content over secure connections only
using SSL/TLS, set it to HTTPS. If you are on Abyss Web Server X2, you
can also choose to have the host serve content on both secure and
non-secure connections by setting Protocol to HTTP+HTTPS. In such a
situation, you can configure some virtual paths to be accessible on secure
connections only by adding them to the Exclusively Serve On HTTPS table.
• HTTP Port: The port on which the new host will wait for HTTP
connections. Its default value is 80. This field is not available if the Protocol
is set to HTTPS only.
• HTTPS Port: The port on which the new host will wait for secure HTTPS
connections. Its default value is 443. This field is not available if the Protocol
is set to HTTP only.
• Certificate: The certificate that will be used for secure connections with the
new host. This field is not available if the Protocol is set to HTTP only. Note
that the certificate’s Host Name (Common Name) should be equal to or
match with the names of the new host that you are declaring. Otherwise,
visitors’ browsers will report a warning about mismatched names on every
access to the host.
• Host Name: The main name of the new host. If the field is empty, the host
will not be associated with any name and will answer to all requests that
reach it on the configured port. The host can also have more than one name:
additional names should be declared later in the Host Names table in the
General dialog related to the host. The host name may be an Internation
Domain Name (IDN) containing non-Latin characters. The host name can
also be a pattern such as *.mysite.com. Refer to the "Patterns Format"
appendix for more information about patterns.
• Documents Path: The path of the web site files. If it is a relative path then it
is considered as a subpath of the server root.
• Log File: The path of the log file. If it is relative, it is considered as a
subpath of the server root. If empty, logging is disabled.
• Copy Configuration From: The configuration of the new host is cloned
from the configuration of already defined hosts or from the default
configuration.
Note: Adding a new host is only possible in Abyss Web Server X2. Abyss Web Server
X1 can only manage a single host.
Configuring a host
To open the configuration dialog of a host, go to the main console dialog and
press the Configure button located on the same line as the host name in the
30
Chapter 5. Hosts Management
Hosts dialog.
General
The General dialog contains the general configuration parameters of a host.
31
Chapter 5. Hosts Management
• Documents Path: The path of the web site files. If it is a relative path then it
is considered as a subpath of the server root.
• Protocol: Set it to HTTP to configure the host to use normal non-secure
connections. To have the host serve content over secure connections only
using SSL/TLS, set it to HTTPS. On Abyss Web Server X2, the host can be
configured to serve content on both secure and non-secure connections by
setting Protocol to HTTP+HTTPS. In such a situation, you can configure
some virtual paths to be accessible on secure connections only by adding
them to the Exclusively Serve On HTTPS table.
• HTTP Port: The port on which the host waits for HTTP connections. Its
default value is 80. This field is not available if the Protocol is set to HTTPS
only.
• HTTPS Port: The port on which the host waits for secure HTTPS
connections. Its default value is 443. This field is not available if the Protocol
is set to HTTP only.
• Certificate: The certificate that is used for secure connections with the
current host. This field is not available if the Protocol is set to HTTP only.
Note that the certificate’s Host Name (Common Name) should be equal to
or match with the names associated with the current host. Otherwise,
32
Chapter 5. Hosts Management
33
Chapter 5. Hosts Management
Note: The Host Names table is only available in Abyss Web Server X2. Abyss Web
Server X1 answers to all the requests that reach the main host on the configured port
regardless of the host name used in the browser.
34
Chapter 5. Hosts Management
Index Files
When a browser asks for a URL that does not contain a filename, the server
checks for the existence of each index file in the mapped directory. If none is
found and automatic directory indexing is enabled, a directory listing is
generated and sent to the browser. Otherwise, an error is reported.
Directory Listing
When a browser asks for a URL that does not contain a filename, and if the
server does not find an index file in the mapped directory, it generates a
directory listing.
35
Chapter 5. Hosts Management
• Scope: Press Edit... to configure the virtual paths where directory listing is
permitted. The displayed dialog has the following items:
• Order: The order that the server follows to check if directory listing is
permitted for a virtual path. If it is set to Allow/Deny, listing is denied by
default and is allowed only if the virtual path is in the Allow for list and
is not in the Deny for list. If it is set to Deny/Allow, listing is allowed by
default and is denied only if the virtual path is in the Deny for list and is
not in the Allow for list.
• Allow for: The list of virtual paths for which directory listing is allowed.
The table can contain also path patterns. See the "Patterns Format"
appendix for more information about patterns.
36
Chapter 5. Hosts Management
• Deny for: The list of virtual paths for which directory listing is denied.
The table can contain also path patterns. See the "Patterns Format"
appendix for more information about patterns.
• Hidden Files: The file names that are equal or that match with the listed file
name patterns in this table are not included in the directory listings. See the
"Patterns Format" appendix for more information about patterns. This table
should only contain file names with no path references.
Aliases
Select Aliases in the host configuration menu to display the aliases table.
37
Chapter 5. Hosts Management
XSSI Parameters
To configure XSSI (eXtended Server Side Includes), select XSSI Parameters in
the host configuration menu.
38
Chapter 5. Hosts Management
For more information about XSSI, refer to "eXtended Server Side Includes"
chapter.
39
Chapter 5. Hosts Management
40
Chapter 5. Hosts Management
• Custom Error Pages: This table contains the customized errors and their
associated URLs.
• Default Custom Error Page: The URL used when an error which code is
not listed in the Custom Error Pages table occurs. If empty, Abyss Web
Server generates automatically a standard error page.
• Local: If it begins with a slash /, the URL is local to the web server.
• Global: If it begins with http://, the URL is global and the web server
informs the browser a redirect to that URL when an error occurs.
Note: It is only relevant to set 4xx and 5xx error codes. Other error codes are handled
internally in the web server and do not lead to displaying an error page.
Note: When using a local URL that is a CGI script or an XSSI page as a custom error
page, the server operates an internal redirection and adds to the custom error page’s
environment variables all the faulty request environment variables prefixed with
REDIRECT_. It adds also the special variables REDIRECT_STATUS and
REDIRECT_STATUS_CODE which contain the status code of the faulty request. For
more information, read "CGI environment variables" section in "CGI, FastCGI, and
ISAPI" chapter.
41
Chapter 5. Hosts Management
Scripting Parameters
To configure CGI, FastCGI, ISAPI, and scripts execution, select Scripting
Parameters in the host configuration menu.
42
Chapter 5. Hosts Management
• Error File: The path of the file where CGI scripts write error messages.
You can leave it empty if you do not want to trace CGI scripts’ errors.
• I/O Timeout: How long (in seconds) the server should wait for a CGI
script or application to deliver content before aborting it.
• Resolve Interpreter from the Windows Registry: Use the Windows
Registry to automatically find the interpreter which can run a CGI script.
This parameter should be used very carefully as it can make the server
report Error 500 (Internal Server Error) for normal documents. For
example, if a HTML file is in one of the CGI Paths (or matches with one of
the CGI Paths patterns), and if this parameter is checked, the server asks
the Windows Registry about the executable that is normally used to open
HTML files (in a similar fashion to what does Windows Explorer to know
what application to launch when you double-click on a document icon).
The Windows Registry gives back your browser executable path and
Abyss Web Server runs the HTML file as a CGI Script with this browser
as its interpreter. But after launching it, Abyss Web Server understands
that this executable is not a valid CGI Interpreter. So it aborts the
executable and reports Error 500.
• Resolve Interpreter using the #! Line: Read the first line of the CGI
script. If it begins with #!, the rest of the line is considered as the path to
the script’s interpreter.
43
Chapter 5. Hosts Management
• Debugging Level: The type of information Abyss Web Server should log
when a FastCGI executable or interpreter is running.
• I/O Timeout: How long (in seconds) the server should wait for a FastCGI
process to deliver content before aborting the connection with it and
reporting an error.
• FastCGI Processes Timeout: How long (in seconds) the server should let
an unused FastCGI process wait before aborting it.
• Interpreters: The server uses this table to know which interpreter to use to
execute a script. The choice is based on the script’s file name extension: an
interpreter runs a script if the extension of that script matches with one of
the associated extensions or extensions patterns of the interpreter.
Each interpreter is defined by its:
• Interface: It has to be set to FastCGI (Local - Pipes) or FastCGI (Local -
TCP/IP Sockets) if the interpreter supports FastCGI and its executable is
available on the computer where the Web server is installed. If you have a
standalone or remote FastCGI server, set it to FastCGI (Remote - Pipes)
or FastCGI (Remote - TCP/IP Sockets) depending on the type of network
protocol it supports. Otherwise, Interface should be set to CGI/ISAPI.
Note that for most FastCGI compliant interpreters, you can either choose
FastCGI (Local - Pipes) or FastCGI (Local - TCP/IP Sockets) with no
noticeable difference as both modes provide comparable performances.
But some FastCGI interpreters such as PHP 5.1.3 and later only support a
single mode of operation. So if an interpreter fails to work in a given
mode, select the other and retry. You can also refer to Aprelium’s Web site
to know which mode is supported by that interpreter. Note also that both
FastCGI (Local - Pipes) and FastCGI (Remote - Pipes) are not available
on Windows 95, 98, and ME.
• Interpreter: The path of the FastCGI/CGI executable or the ISAPI
extension (not available if Interface is set to FastCGI (Remote - Pipes) or
FastCGI (Remote - TCP/IP Sockets)).
• Arguments: The additional arguments that are used to run a
FastCGI/CGI executable (not available if Interface is set to FastCGI
(Remote - Pipes) or FastCGI (Remote - TCP/IP Sockets)). These
arguments are ignored if the interpreter is an ISAPI extension. Any
occurrence of %1 or $1 in the arguments is replaced by the script file
name when running the FastCGI/CGI interpreter.
• Advanced Parameters: If Interface is set to FastCGI (Local - Pipes) or
FastCGI (Local - TCP/IP Sockets), press Edit... to access the advanced
parameters dialog which contains the following elements:
44
Chapter 5. Hosts Management
• Pipe Path: The full path of the pipe that will be used to communicate
with the interpreter if Interface is set to FastCGI (Remote - Pipes). If the
FastCGI server is running locally, its pipe path should be of the form
\\.\pipe\name where name is the name of the pipe. If the FastCGI
server is available on another computer on the LAN, its pipe path should
be of the form \\computer\pipe\name where computer is the name
of the computer hosting the FastCGI server.
• Remote Server IP Address: The IP address of the computer that is
hosting the interpreter’s FastCGI server (available only if Interface is set
to FastCGI (Remote - TCP/IP Sockets)).
• Port: The number of the port the interpreter’s FastCGI server is listening
on (available only if Interface is set to FastCGI (Remote - TCP/IP
Sockets)).
45
Chapter 5. Hosts Management
• Check for file existence before execution: If enabled, the server will
report an error when the script file requested is not physically available
on the disk. If this option is disabled, the server will launch the
interpreter associated with the requested script without even if its file
does not exist on the disk. It is then up to the interpreter to report an error
or to act accordingly.
• Type: Some interpreters are not fully conforming to the FastCGI/CGI or
the ISAPI specifications. By setting this parameter to the correct value, the
server activates a special workaround mode to support them. PHP
interpreters (both FastCGI/CGI and ISAPI version) and Shorthand ISAPI
should have their Type set to PHP Style. ActiveState ActivePerl ISAPI
should have its Type set to ActivePerl ISAPI. For any other interpreter,
set Type to Standard.
• Associated Extensions: The list of file name extensions that are to be
handled by the current interpreter. You can also define an extension
pattern. Refer to the "Patterns Format" appendix for more information
about patterns. To associate more than a single extension with an
interpreter, press Add... for every extension to declare it.
For more information about scripts, see "CGI, FastCGI, and ISAPI" chapter.
46
Chapter 5. Hosts Management
ASP.NET Parameters
Select ASP.NET Parameters in the host configuration menu to display the
ASP.NET applications table.
• Virtual Path: The virtual path containing all the ASP.NET application files
and subdirectories.
• .NET Version: The version of .NET Framework that will be used to run the
ASP.NET application.
47
Chapter 5. Hosts Management
48
Chapter 5. Hosts Management
Access Control
To restrict and manage the access to paths in your web site, select Access
Control in the host configuration.
49
Chapter 5. Hosts Management
Note: If Deny for list is empty and the order is Deny/Allow, access is granted to all
declared users and groups.
50
Chapter 5. Hosts Management
IP Address Control
To restrict and manage the access to paths in your web site, select IP Address
Control in the host configuration.
51
Chapter 5. Hosts Management
Note: If Denied IP Addresses list is empty and the order is Deny/Allow, access is
granted to any client.
URL Rewriting
To automatically redirect certain requests or rewrite their URL, select URL
Rewriting in the host configuration menu.
52
Chapter 5. Hosts Management
• URL Rewriting Rules: Use this table to edit, remove or add URL rewriting
rules. The URL rewriting rule definition dialog contains the following items:
53
Chapter 5. Hosts Management
54
Chapter 5. Hosts Management
55
Chapter 5. Hosts Management
not empty, both are concatenated in the final URL or virtual path that the
request will be redirected to.
The Escape Redirection Location option should be unchecked only when
the Redirect To field contains a location which is already URL escaped.
Note that if Type is set to Relative and the virtual path resulting from the
processing of Redirect to is relative (which means that it does not begin
with /), the value of Base Virtual Path is prepended to it.
Compression
Compression is performed on any content (be it static or dynamically
generated) provided that all the following conditions are satisfied:
If one or more of the above conditions is not met, the current content is sent
back to the browser uncompressed.
56
Chapter 5. Hosts Management
57
Chapter 5. Hosts Management
Bandwidth Limits
With Abyss Web Server, you can have fine control on the bandwidth every
host uses. You can even control the bandwidth allowed for a particular file or
script, or for the contents of a directory.
The Bandwidth Limits dialog has the following fields:
Note: To set a limitation on the bandwidth of the whole host, add a bandwidth limit
with / as its scope.
Note: If the virtual path of a request matches with more than a single bandwidth
limit, Abyss Web Server will respect all of them.
Logging
Select Logging in the host configuration menu to display the Logging options.
58
Chapter 5. Hosts Management
• Logging Format: This parameter sets the format to be used in the log file for
the current host. It offers the choice between the standard formats Common
59
Chapter 5. Hosts Management
Log Format or the Combined Log Format, and the custom logging formats
defined under the Logging Parameter dialog in Server Configuration.
• Do not Log Requests for: This table contains the virtual paths for which
logging is disabled. A virtual path must begin with a slash /. It can also be a
path patterns. In such a case, the logging is disabled for any virtual path
that matches with the specified pattern. Refer to the "Patterns Format"
appendix for more information about patterns.
• Do not Log Requests from: This table contains the IP addresses or IP
address ranges for which logging is disabled. Refer to "IP Addresses and
Ranges Format" appendix for more information about the IP addresses and
ranges.
Reverse Proxy
Abyss Web Server can act as a reverse proxy to provide content transparently
from another Web server behind it (commonly called a back-end server.) The
proxied server can be another Web server or an application server with a
restricted or even a trivial HTTP support that has to be shielded from external
clients. Reverse proxying is also the recommended way to take advantage of
JSP (Java Servlet Pages) and Tomcat Web applications. Abyss Web Server
automatically selects the best version of the HTTP protocol when
communicating with a back-end server. It is also able to keep-alive
connections with HTTP/1.1 back-end servers and sharing pools of
connections between several requests and hosts.
Select Reverse Proxy in the host configuration menu to display a dialog
containing the Reverse Proxy Rules table. Use that table to to edit, remove or
add reverse proxy mapping rules rewriting rules.
Each reverse proxy mapping rule is defined by the following parameters:
• Local Virtual Path: The local virtual path on the current host which
contents will be mapped to the remote virtual path on the reverse proxy.
• Remote IP Address: The IP address of the back-end server.
• Remote Port: The port on which the Web server is listening on the back-end
server.
• Remote Virtual Path
• Advanced Parameters: Press Edit... to access the advanced parameters
dialog. This dialog exposes the following fields:
• Fix URLs in Cookies: If checked, HTTP Cookies received from the
back-end are rewritten to appear as if they were originated from the
current host.
60
Chapter 5. Hosts Management
• Virtual Path: The virtual path associated with the restricted downloads
area. This virtual path will be prepended to all URLs referring to that area.
• Files Root Path: The real directory which contains the files that are served
from that area.
• Secret String: The secret string which is used to compute the hash included
in the URL.
61
Chapter 5. Hosts Management
<BODY>
<?php
if ($limit_by_ip) {
$t = $secret_string . $file_name . $hex_timestamp . $_SERVER[’REMOTE_ADDR’];
}
else {
$t = $secret_string . $file_name . $hex_timestamp;
}
$hash = md5($t);
$url = $virtual_path . $hash . "/" . $hex_timestamp . $file_name;
</BODY>
</HTML>
62
Chapter 5. Hosts Management
if limit_by_ip:
t = secret_string + file_name + hex_timestamp + os.environ["REMOTE_ADDR"]
else:
t = secret_string + file_name + hex_timestamp
hash = hashlib.md5(t).hexdigest()
url = virtual_path + hash + "/" + hex_timestamp + file_name
# Output body
print ’<HTML><BODY><A SRC="%s">Click here to download the file</A></BODY></HTML>’ % url
Anti-Leeching
Anti-Leeching is a system that prevents web pages not belonging to your host
from referring or linking to materials available in your web site. Leeching is
also known as cross-site linking.
When a request is sent to the host, and if its virtual path is in the configured
Anti-Leeching Scope, the server checks if the Referer header in the request
matches with the current host or with one of the host names or the patterns in
the Allow Links from table. The Referer header is usually set by the
browser to indicate to the server from which web page the current URL was
requested (or linked to.) If it does not match, the request is considered as a
leeching attempt and is redirected to the URL configured in the Redirect
Leechers to URL parameter.
63
Chapter 5. Hosts Management
64
Chapter 5. Hosts Management
Statistics
The Statistics dialog displays a set of statistics on the host’s activity since the
server installation or the last host statistics reset:
• Total Uptime: The total time during which the host was up.
• Uptime since Last Restart: The time during which the host was up since
the last server start or restart. If the host is stopped, its value is zero.
• Total Hits: The total number of requests processed by the current host.
• Compressed Hits: The number of requests processed by the current host
that resulted in compressed responses.
• Error Hits: The number of requests targeting the current host that resulted
in an error.
• HTML Hits: The number of requests the host replied to by a document
which MIME type was text/html.
• Image Hits: The number of requests the host replied to by a document
which MIME type starts with image/.
• Not Modified Hits: The number of requests for which the host detected
that the requested document has not changed.
• Transferred Data: The total size of the payload sent by the current host to
the clients.
• Compression Savings: The amount of data that was saved thanks to the
compressed responses sent by the current host to the clients.
The host statistics are refreshed automatically every 10 seconds. You can also
press Refresh for immediate refreshing. They can be reset by pressing Reset.
Note: The statistics are preserved when the server is shut down or when the host is
stopped.
Note: The host statistics are also available in real time to scripts and XSSI pages.
Refer to the "CGI environment variables" for more information.
65
Chapter 6. CGI, FastCGI, and
ISAPI
Abyss Web Server supports CGI (Common Gateway Interface), FastCGI, and
ISAPI Extensions (Internet Server Advanced Programming Interface
Extensions) standards for dynamic content generation. It can process scripts
by CGI, FastCGI, and ISAPI interpreters and serve content generated by CGI,
FastCGI, and ISAPI applications.
Setting up an interpreter
To setup a language interpreter to be used by scripts in Abyss Web Server,
follow these instructions:
66
Chapter 6. CGI, FastCGI, and ISAPI
• Checking the Interpreters table and trying to match the script’s extension
with a declared interpreter.
• Using the Windows Registry to match the script’s extension with an
available interpreter.
• Reading the first line of the script. If it begins with #!, the rest of the line
must contain a valid interpreter path.
67
Chapter 6. CGI, FastCGI, and ISAPI
• URL: The full URI of the current request. It is made of the concatenation of
SCRIPT_NAME and PATH_INFO (if available.)
• SCRIPT_URL and REQUEST_URI: The original request URI sent by the
client.
• REQUEST_METHOD: The method used by the current request; usually set to
GET or POST.
• QUERY_STRING: The information which follows the ? character in the
requested URL.
• CONTENT_TYPE: The MIME type of the request body; set only for POST or
PUT requests.
• CONTENT_LENGTH: The length in bytes of the request body; set only for
POST or PUT requests.
• AUTH_TYPE: The authentication type if the client has authenticated itself to
access the script.
• AUTH_USER and REMOTE_USER: The name of the user as issued by the
client when authenticating itself to access the script.
• ALL_HTTP: All HTTP headers sent by the client. Headers are separated by
carriage return characters (ASCII 13 - \n) and each header name is prefixed
by HTTP_, transformed to upper cases, and - characters it contains are
replaced by _ characters.
• ALL_RAW: All HTTP headers as sent by the client in raw form. No
transformation on the header names is applied.
• SERVER_SOFTWARE: The web server’s software identity.
• SERVER_NAME: The host name or the IP address of the computer running
the web server as given in the requested URL.
• SERVER_ADDR: The IP address of the computer running the web server.
• SERVER_PORT: The port to which the request was sent.
• GATEWAY_INTERFACE: The CGI Specification version supported by the
web server; always set to CGI/1.1.
• SERVER_PROTOCOL: The HTTP protocol version used by the current
request.
• REMOTE_ADDR: The IP address of the computer that sent the request.
• REMOTE_PORT: The port from which the request was sent.
• DOCUMENT_ROOT: The absolute path of the web site files. It has the same
value as Documents Path.
• INSTANCE_ID: The numerical identifier of the host which served the
request. On Abyss Web Server X1, it is always set to 1 since there is only a
single host.
68
Chapter 6. CGI, FastCGI, and ISAPI
• APPL_MD_PATH: The virtual path of the deepest alias which contains the
request URI. If no alias contains the request URI, the variable is set to /.
• APPL_PHYSICAL_PATH: The real path of the deepest alias which contains
the request URI. If no alias contains the request URI, the variable is set to the
same value as DOCUMENT_ROOT.
• IS_SUBREQ: It is set to true if the current request is a subrequest, i.e. a
request not directly invoked by a client. Otherwise, it is set to true.
Subrequests are generated by the server for internal processing. XSSI
includes for example result in subrequests.
If the current request is served by an SSL enabled host, the following SSL
related variables are also available:
69
Chapter 6. CGI, FastCGI, and ISAPI
The Abyss Web Server specific variables provide a means to access to server
and host statistics. They are listed below:
70
Chapter 6. CGI, FastCGI, and ISAPI
In addition to these variables, all header lines received in the request are
added to the environment with the prefix HTTP_ followed by the header name
in upper cases. All - characters in the header name are changed to underscore
_ characters. For example, User-Agent is translated to HTTP_USER_AGENT.
If the request results from an internal redirection (from an XSSI document or if
it is used as a custom error page for example), the environment variables of
the parent request are also added and each variable name is prefixed by
REDIRECT_. The parent request’s status code is stored in the special variables
REDIRECT_STATUS and REDIRECT_STATUS_CODE. The cookies of the
parent request are also passed to the redirected request in the COOKIES
environment variable. REDIRECT_STATUS_CODE may seem redundant but it
is actually useful when with PHP scripts as some PHP configurations require
setting REDIRECT_STATUS to a fixed value.
71
Chapter 6. CGI, FastCGI, and ISAPI
Note: The CGI environment variables are not only useful for CGI applications and
interpreters. They are also available and used in XSSI pages and ISAPI interpreters
and applications.
FastCGI
Abyss Web Server features a full support for the FastCGI responder role as
described in the FastCGI specification version 1.0 available in
http://www.fastcgi.com/devkit/doc/fcgi-spec.html.
It supports mono-threaded and multi-threaded FastCGI applications and
automatically spawns the required number of FastCGI processes to
accommodate the current server load. Processes that have not been used after
a period of time (as set in FastCGI Processes Timeout) are aborted. Abyss
Web Server supports also connecting to and using remote FastCGI servers.
FastCGI developers benefit also from advanced debugging capabilities in
Abyss Web Server since it can be configured to log errors only or all the
input/output and low level information exchanged between the FastCGI
application and the server.
ISAPI Extensions
Abyss Web Server supports a large subset of the ISAPI 5.0 specification
suitable for running most of the ISAPI extensions available to date. ISAPI
extensions are loaded in the server process space on demand. They remain
there until the server is restarted or stopped. Since ISAPI extensions live in the
server process space (contrarily to CGI application which are launched in their
own process), any ISAPI error or crash affects the whole server. But thanks to
the APX (Anti-crash Protection eXtension) architecture of Abyss Web Server
such problems can be immediately detected and the server is restarted with
almost no noticeable downtime.
Abyss Web Server makes ISAPI development easier thanks to its advanced
debugging capabilities: With the help of the Debugging Level parameter in
ISAPI Parameters, you can configure the server to log unhandled callback to
the ISAPI extension, all callbacks, or all callbacks with all the exchanged
input/output between the extension and the server.
X-Sendfile Support
Scripts and Web applications using CGI, FastCGI or ISAPI (as well as ASP.NET
applications) can accelerate file service by emitting the special CGI header
X-Sendfile. Such an acceleration is actually performed by delegating to the
low-level parts of the Web server the service of the static file to the client.
72
Chapter 6. CGI, FastCGI, and ISAPI
Example: A very simple script taking advanatge of X-Sendfile support (PHP version)
<?php
?>
The virtual path of the above script should be added to Script Paths. The declared
script path should have its X-Sendfile Support enabled and its Files Root Path set
to the real directory from which the file hello.txt should be served.
73
Chapter 7. eXtended Server Side
Includes
XSSI Syntax
<!-- #directive attr1="value1" attr2="value2" ... -->
Directives are enclosed in standard HTML comments. So if XSSI processing is
not enabled, your browser will ignore them. Otherwise, each directive is
evaluated and replaced by its results.
Note: Enclosing an attribute’s value in double quotes is not mandatory if it does not
contain whitespaces or references to variables.
Note: A whitespace should precede the comment terminator -->.
Attribute Values
If an attribute value is enclosed between single quotes, only character
escaping is performed on it.
If an attribute value is enclosed between double quotes, both character
escaping and variables expansion are performed on it.
Character Escaping
To preserve the literal value of a special character (\, ", ’, , {, } or $), precede
it with a backslash \ character.
74
Chapter 7. eXtended Server Side Includes
Variables Expansion
Parts of the attribute value string that are of the form $VARNAME are
substituted with the actual value of variable VARNAME. If VARNAME is not
declared, it is replaced by an empty string. The variable name must be
enclosed between braces as in ${VARNAME} if the characters following it may
be considered as part of the name.
Directives
#config
This directive is used to override the default XSSI settings while processing
the XSSI file.
75
Chapter 7. eXtended Server Side Includes
#echo
Form: <!-- #echo var="variable_name" -->
#echo inserts the value of an XSSI environment variable. XSSI environment
variables include those set using the #set directive, those available for CGI
scripts (see "CGI environment variables" in the "CGI, FastCGI, and ISAPI"
chapter), and five special variables:
76
Chapter 7. eXtended Server Side Includes
#exec
Form 1: <!-- #exec cgi="cgi_file" -->
#exec cgi executes a script and inserts its output. If cgi_file begins with
a /, it is considered as a virtual path and the directive will behave as if it is
<!-- #include virtual="cgi_file" -->. If cgi_file does not begin
with a /, it is considered as a relative file name and the server will try to locate
it inside the directory containing the currently processed XSSI file. If it is
found there, #exec cgi will behave as if it is <!-- #include
file="cgi_file" -->. Otherwise, cgi_file will be searched inside the
virtual paths listed in #exec cgi’ Search Paths in the XSSI Parameters of the
current host.
#flastmod
Form 1: <!-- #flastmod file="file_name" -->
#flastmod file inserts the last modification date of the file file_name.
file_name is a relative path from the directory containing the processed
XSSI file. It file can only be in the same directory or in one of its subdirectories.
77
Chapter 7. eXtended Server Side Includes
#fsize
Form 1: <!-- #fsize file="file_name" -->
#fsize file inserts the size of the file file_name. file_name is a relative
path from the directory containing the processed XSSI file. It can only be in the
same directory or in one of its subdirectories.
#include
Form 1: <!-- #include file="file_name" -->
#include file instructs the web server to insert a file which must contain
valid HTML contents. file_name is a relative path from the directory
containing the processed XSSI file. The included file can only be in the same
directory or in one of its subdirectories.
#printenv
Form: <!-- #printenv -->
#printenv outputs the current CGI environment variables. For more
information, refer to the "CGI environment variables" section.
78
Chapter 7. eXtended Server Side Includes
#set
Form: <!-- #set var="variable_name"
value="variable_value" -->
#set sets the value of the variable variable_name to variable_value. If
no variable called variable_name exists, it is created before being set. #set
can be used to change the value of CGI variables or any already declared
variable.
Conditional blocks
Syntax
Conditional blocks in XSSI look as follows:
<!-- #if expr="test_expr_1" -->
Content to process if test_expr_1 is true
<!-- #elif expr="test_expr_2" -->
Content to process if test_expr_2 is true
.
.
<!-- #elif expr="test_expr_n" -->
Content to process if test_expr_n is true
<!-- #else -->
Content to process if all the above tests are false
<!-- #endif -->
#elif sections are optional. A conditional block can have zero or many of
them. The #else is optional and a conditional block can have either no
#else or exactly one.
Conditional blocks can be nested.
Expression evaluation
The value of the expr attribute inside #if and #elif directives is considered
as an expression which evaluates to true or false according to these rules:
string
Evaluates to true if string is not empty.
string_1 < string_2
string_1 <= string_2
string_1 > string_2
string_1 >= string_2
string_1 == string_2
Performs a lexicographic comparison between string_1 and string_2.
79
Chapter 7. eXtended Server Side Includes
string_1 = string_2
string_1 != string_2
Performs a lexicographic comparison between string_1 and string_2. If
string_2 has the form /regex/, a regular expression matching operation
will take place instead. Matched sub-strings are captured inside the
variables $0, $1, ..., $9. For more information about backreferences, refer
to the "Regular Expressions" appendix.
test_expr_1 && test_expr_2
Evaluates to true if both test_expr_1 and test_expr_2 expressions are true.
test_expr_1 || test_expr_2
Evaluates to true if at least one of the expressions test_expr_1 and
test_expr_2 is true.
! test_expr
Evaluates to true if test_expr is false.
( test_expr )
Evaluates to true if test_expr is true. Parentheses are used to enclose
sub-expressions and supersede the priorities of their operators.
! has higher priority than && and || which at their turn have higher priority
than =, !=, ==, <=, >=, <, and >.
Encoding
In Abyss Web Server, the directives #echo, #exec, #fsize, #flastmod, and
#include accept an optional argument encoding.
The value of this argument determines which conversion method is to be
applied to the output of an XSSI directive. It can be:
80
Chapter 7. eXtended Server Side Includes
81
Chapter 8. Custom Directory
Listings
Directory listings are fully customizable in Abyss Web Server. If you do not
like their standard look, you can provide the server with your listing template.
Advanced users can do better by writing a script to generate custom listings.
Defining a template
A directory listing template is defined by its:
82
Chapter 8. Custom Directory Listings
• MIME Type:
text/html; charset=utf-8
• Header:
<HTML>
<HEAD>
<TITLE>
Index of <!-- #echo var="URL" encoding="reverse-url" -->
</TITLE>
</HEAD>
<BODY>
<TABLE BORDER=0>
<TR>
<TD>Name</TD>
<TD>Size</TD>
<TD>Date</TD>
<TD>MIME Type</TD>
</TR>
• Body Line:
<TR>
<TD>
<A HREF="<!-- #echo var="DIRLIST_FILE_URL" -->">
<!-- #echo var="DIRLIST_FILE_NAME" -->
</A>
</TD>
<TD> <!-- #echo var="DIRLIST_FILE_SIZE" --> </TD>
<TD> <!-- #echo var="DIRLIST_FILE_DATE" --> </TD>
83
Chapter 8. Custom Directory Listings
• Footer:
</TABLE>
</BODY>
</HTML>
Scripts
When a directory listing is generated through a script, the server gathers the
information related to the files inside the listed directory and packs it in a
special string. Then the script is executed and the special string is POSTed to it
inside a variable called files. The server also POSTs the directory virtual
path in a variable which name is path as well as an URL encoded (escaped)
version of the virtual path in a variable named encoded_path.
This special string passed in the files variable is of the form:
. . . .
. . . .
namen-1−→ urln-1−→ sizen-1−→ daten-1−→ MIME-typen-
1[CR]
84
Chapter 8. Custom Directory Listings
<BODY>
<TABLE BORDER="0">
<TR>
<TD>Name</TD>
<TD>Size</TD>
<TD>Date</TD>
<TD>MIME Type</TD>
</TR>
<?php
if ($mimetype == "")
$mimetype = "Directory";
</TABLE>
</BODY>
</HTML>
posted_data = cgi.FieldStorage()
print "<HTML><HEAD>"
print "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">"
print "<TITLE>Index of %s</TITLE></HEAD>" % posted_data["path"].value
if (mimetype == ""):
mimetype = "Directory"
print "</TABLE></BODY></HTML>"
85
Glossary
C
Common Gateway Interface
CGI defines how web servers interact with an external program in order
to generate dynamic content. Such programs can be written in any
programming language including C, Perl and PHP.
H
Host Name
Each computer on a TCP/IP network has usually one or more host names.
Networking software transparently translates them to IP Addresses for
internal use.
HTTP defines how browsers and web servers communicate over a TCP/IP
network.
I
Internet Protocol
86
Glossary
IP Address
S
eXtended Server Side Includes
XSSI are a set of directives that can be included in HTML pages and
processed by the web server to create simple dynamic documents.
T
Transport Control Protocol
TCP/IP
U
Universal Resource Locator
87
Appendix A. Command Line
Parameters
Abyss Web Server command line parameters are as follows:
88
Appendix B. Startup
Configuration
Select Startup Configuration in the Server menu to choose how Abyss Web
Server should start up. The displayed dialog offers the following choices:
89
Appendix C. IP Addresses and
Ranges Format
90
Appendix C. IP Addresses and Ranges Format
91
Appendix D. Patterns Format
When matching a string (a sequence of characters containing an extension or a
virtual path) with a pattern, the following rules apply:
• *: any string including the empty string matches with this pattern.
• *.*: list.txt and holiday.jpeg match while my-directory doesn’t.
• /*.php: /hello.php and /mysite/scripts/test.php match but
/mysite/test2.pl doesn’t.
• /*/*.php: /mysite/test.php and /mysite/scripts/test.php
match with this pattern while /test.php doesn’t.
• mp?: Any 3 character long string that begins with mp matches.
• ?????: Any 5 character long string matches.
• mp[2-4]: Only mp2, mp3, and mp4 match.
• mp[!2-4]: All 3 character long strings that begin with mp match except mp2,
mp3, and mp4.
• mp[2-4g]: Only mp2, mp3, mp4, and mpg match.
• mp[2\-4]file: Only mp2file, mp-file, and mp4file match.
92
Appendix E. Regular Expressions
Regular expressions in Abyss Web Server conform to the PCRE syntax (Perl
Compatible Regular Expressions). This appendix is a quick guide to
understand the basics of regular expressions. For an extensive description of
their syntax, refer to the PCREPATTERN section in
http://pcre.org/pcre.txt.
When matching a string (a sequence of characters) with a regular expression,
the following rules apply:
• abc: any string containing the substring abc matches with this regular
expression.
• abcd*: any string containing the substring abc followed by zero or more d
characters matches with this regular expression.
93
Appendix E. Regular Expressions
• abcd?: any string containing the substring abc or abcd matches with this
regular expression.
• ab(cd)?: any string containing the substring ab or abcd matches with this
regular expression.
• ^/dir: any string starting with the substring /dir matches with this regular
expression.
• \.exe$: any string ending with the substring .exe matches with this regular
expression. Note here that the character . has been escaped to remove its special
meaning.
• ^/dir/.*\.exe$: any string beginning with /dir and ending with .exe
matches with this regular expression.
• ^/dir/[^./]+\.exe$: any string starting with /dir followed by 1 or more
characters except . and /, and followed by .exe matches with this regular
expression.
94
Appendix F. Uninstalling The
Software
To run the uninstaller, open the Start menu, choose Programs, then Abyss
Web Server and select Uninstall. An alternative way is to open the
Add/Remove Programs section in the Window’s Control Panel, select Abyss
Web Server from the dialog’s list box and press Install/Uninstall. . . .
Follow the on-screen information to remove Abyss Web Server. The
uninstaller may ask you if you wish to completely delete Abyss Web Server’s
directory. Be careful! If you confirm, it erases the server’s configuration file
and eventually the hosted web site.
95
Appendix G. Solving Ports
Listening Problems
TCP/IP ports range from 1 to 65535. Abyss Web Server reports a listening
problem on a port when one of the following situations is happening:
96
Appendix H. Troubleshooting
Guide
1. The console or the web site cannot be accessed from the computer on which
Abyss Web Server is running.
If you cannot browse 127.0.0.1, ::1, or localhost, check if you have
configured a HTTP proxy in the browser. If so, disable proxy usage for
127.0.0.1, ::1, and localhost.
2. Abyss Web Server reports the following error at startup: "Cannot start the
host XYZ (listening problem)"
This error arises when the XYZ’s host port is already used by another
application or if you do not have the privilege to use it. You have to choose
another port for the host using the console. Refer to "Solving Ports Listening
Problems" for more information.
3. Abyss Web Server reports the following error at startup: "Cannot start the
console (listening problem)"
This error occurs when the console port is already used by another application
or if you do not have the privilege to use it. Refer also to "Solving Ports
Listening Problems" for more information.
97