apex is a Perl-based web server that
is very easy to use
apex
server configuration parameters are set in the httpd.conf file.
apex
settings
are placed in the top section
of the file:
[Settings]
#DEBUG MODES
# 0 - off
# 1 - brief request/response trace
# 2 - verbose request/response with cgi debugging
# 3 - verbose
DEBUG=off;
# Local Timezone setting - see httpd.pl for more info
TIMEZONE=US/Eastern;
# The listen port of this server
LISTENPORT=8088;
# Log access requests?
#LOGGING=off;
# web server access log
LOGFILE=./logs/access.log;
# Config file for mime types
MIMEFILE=./mime.types;
# Virtual Private Networks affect socket listener
VPN=no;
# Optional Auto-Homepage title
PAGETITLE='<h2>apex samples</h2>';
# Sort Auto-Homepage :comments in reverse alphabetical order
#PAGEORDER=reverse;
# Sort Auto-Homepage :comments in alphabetical order
PAGEORDER=alpha;
# Sort Auto-Homepage :comments in the order they appear in the .conf
file
#PAGEORDER=file;
# List possible index files
INDEXFILES=index.html|index.htm;
# List the maximum acceptable size of a URL
MAXURLSIZE=2048; ...
apex
directives
comprise the rest of the file:
syntax of directives:
/uri:directive='value';
where:
/uri maps to http://localhost:port/uri
:directive is one
of the following:
:docroot - configure the uri as a docroot (or sub-docroot that spans a
different physical file directory)
:alias - display the aliased file
instead of the uri
:list - allows for directory
indexing (list the contents of a directory)
:http (tbd) - allow info to be
placed in the http header
:header - your html header
(defaults if not present)
:body - cgi commands (commands
executed by the operating system)
:mime - mime type (tells the
browser about the type of data being served)
:footer - your html footer
(defaults if not present)
:comment - description for
auto-home-page link (if directive is present)
:password - password-protect a
link (using a basic authentication pop-up at the browser)
apex
run-time parameters are configured using the apex.env file:
#
# Environment file for apex/httpd
#
PROC="httpd" Þ process name (must match the name of the
.pl file)
INSTANCE="apex" Þ name for the instance (e.g. "apex-8080")
RUNAS=nobody Þ process owner under unix
CONTROL_LOG="logs/control.log" Þ logs startup and shutdown events
MESSAGES_LOG="logs/startup.log" Þ
logs run-time messages and debug info
CONF="./$PROC.conf" Þ configuration file name
|