| |
Web
Server
- Web
interface of Eserv management
- Calling
the web-interface
- Diagnostics
- HTTP
Server
- Virtual
HTTP Servers
- Dinamic
pages
- Builtin
commands
- CGI
expansion
The primary task of the Web Server included
in Eserv is to maintain operation of the Web interface described
below. Nevertheless, it can be successfully used as a regular Web
Server both for the Intranet in a LAN and for the Internet.
(03.08.1999) | |
The Web Eserv management interface carries
out the same role as the graphic Eserv management interface, but if
compared to the latter has some advantages:
- The Administrator can effect remote Eserv management, i.e. he
or she does not necessary have to work on the computer where Eserv
has been started. It is possible to apply to the Web interface
from a browser installed on any computer in the LAN, and even from
the Internet. The authority of the Administrator is checked in the
usual way, through inquiry of the name and password, i.e.
non-authorised access is excluded.
- Being based, unlike the graphic interface, on the use of
editable html templates (as in Eserv/1.*), the Web interface can
be set up by the Administrator.
(03.08.1999) | |
Application to the Web interface from any
browser will be made by URL:
http://Eserv_server_name:port_number/admin/
In place of Eserv_server_name put the network name of the
computer where Eserv has been started, or the IP address of this
computer, and the port number should match the number installed by
the configuration program, otherwise defaulting to 3128, e.g.
http://localproxy:3128/admin/
or
http://10.1.1.1/admin/
or, with the browser started on the same PC where Eserv has been
started,
http://localhost:3128/admin/
To enable the browser to apply to the Web interface, the browser
should be set to address Eserv directly (not via proxy) and not try
to call to access the Internet. To do this, put a tick in the
browser against the setup option “Not Use Proxy for Local Addresses?
and in the field “Not Use Proxy for Addresses Beginning With?
specify the addresses/names you use to apply to the Web interface
(in this example it’s “localproxy? ?0.1.1.1?and “localhost? and
delete the tick against the option “Establish Internet Connection if
Required? More information on setup of browsers see in the separate
client.htm text. (03.08.1999) | |
If the Web interface still does not appear in
the browser window after these URLs have been input and Enter
pressed, the reason may lie in the setup of one of the three
components:
- TCP/IP protocols,
- The browser, or
- Eserv.
It is very easy to check up operative ability
of TCP/IP and Eserv with the help of telnet.exe included in the
Windows set:
- On the PC where Eserv has been started, run (from the Windows
menu “Start/Run? the command
telnet localhost 3128
If telnet starts and runs this command without an error
message, Eserv and TCP/IP work well on the local PC. In addition,
immediately after connection (a cursor will appear in the telnet
window when connection is established) you can check issuance of
the first page of the Web interface. To do this, put a tick
against “Input Mapping?in the telnet menu “Terminal/Parameters?
type in the telnet window the command
GET/admin/HTTP/1.0
and press Enter twice. In reply, Eserv will give an html text
of the first page of the Web interface. While typing the command,
no typing errors are allowed (the Web Server it not a text editor,
and corrections will not work here). If you have typed the command
incorrectly, close telnet and start it again, or press Enter
twice, and Eserv will issue an error message.
If telnet will not start (Windows says that there is no such
file) it is most likely that the TCP/IP protocol is incorrectly
installed or not installed at all on this PC.
If telnet starts but will not establish connection with Eserv,
then either Eserv is not started or is setup for another port, or
the Eserv access restriction system is set up incorrectly (see
6.9). In the latter case Eserv will report the problem in the file
LOG\datehttp.log.
- When local operation of TCP/IP + Eserv has been checked up,
you can similarly check up LAN operation of TCP/IP. From other
computers in the network run the command
telnet Eserv_computer_name 3128
or use in this command the IP address of the computer instead
of the computer name (not all local networks are capable of fast
transformation of the name into the IP address).
- If in both modes Eserv and the network work normally, and the
Web interface still does not appear in the browser, the browser
setup should be sorted out or another browser should be tried.
(03.08.1999) | |
The Web Server works under the protocol
HTTP/1.1 (the current version of the Web protocol adopted by w3.org
in 1997 as the standard).
This server works on the same port as the HTTP proxy, likewise
defaulting to Port 3128. Setup of the port number and other
parameters is done in the section WebServer. After changing the port
number, the configuration has to be saved and Eserv rebooted.
Eserv can transmit by the HTTP browser any files located in the
root directory of the Web Server or in “virtual directories?
Virtual directories are directories with files for the Web located
anywhere on the computer and not necessarily in the directories
subordinated to the root directory, but “from outside? for
browsers, they will look as enclosed subordinated directories.
By default, the Web Server root directory will be wwwroot in the
directory Eserv. The file index.html from this directory will be
output by URL:
http://server-_name:port/index.html
or simply
http://server_name:port/
since index.html is the “default file?for any directory of the
server.
Subdirectories of the directory wwwroot will be treated by the
server as enclosed directories. For instance, in wwwroot there is a
directory “admin?containing files of the Web interface. For the
browser it will look as
http://server_name:port/admin/
Virtual directories will also look as subdirectories:
http://server_name:port/subdirectory/
but will not have to be in wwwroot. While setting up virtual
directories, two basic parameters are set. The first one is the line
that will replace the line “subdirectory?in the above URL. The
second parameter is the directory where files for this virtual
directory are stored.
Setup of virtual directories is done in the section
WebServer/VirtualDirectories. While processing HTTP inquiries,
Eserv’s Web Server checks with the list of virtual directories and,
if a match is found, takes the files from the real directories
defined there. (03.08.1999) | |
If the computer where Eserv is installed has
several network names (a multihomed computer, i.e. located in
several subnets at once), installation of several different logical
(virtual) Web Servers on one physical PC and in one program (e.g.
Eserv) is possible. In this case, addressing the same server by
different names, the browser will receive different answers. For
example, if Eserv is located on a computer with network names
www.yourcompany.com and www.yourcompany.ru, it can give the English
contents in reply to application by the first name, and the Russian
contents in reply to application by the second name. Materials in
different languages are located in different directories, and, while
setting up Eserv it should be specified, which directory is to be
addressed by which name.
Setup of virtual servers is done in the section
WebServer/VirtualServers. The principle is very similar to that of
setting up virtual directories, i.e. you specify which network name
matches which root directory.
To establish virtual servers, Eserv uses the Host field in HTTP
inquiries, and does not require a unique IP address for each of the
network names. This method is recommended by the current HTTP
protocol standard and is automatically supported by all browsers.
If addressing Eserv with set virtual servers by a name that is
not present in the list of virtual servers, the root directory will
accept the directory specified in the WebServer/RootDirectory field
(i.e. wwwroot by default). (03.08.1999) | |
If the built-in means of the Eserv Web Server
are insufficient for any purpose, it is possible to expand the Web
Server with the help of external programs that contact the server
through the commonly used CGI interface. Such programs are often
called CGI scripts.
On Web inquiries of a special form, the Eserv HTTP Server can
start external exe programs, assign the defined parameters either
through the command line, a variable environment or a standard
input, obtain the response of the program in a standard output file
and output these data to the browser as a reply to the HTTP inquiry.
Eserv identifies the need to start an external CGI program by the
.exe sub-line of the inquiry. This means that if the inquiry line
contains the name of a program located in the directory structure of
the Web Server, Eserv will start this program. To prevent starting
programs not intended for this (i.e. simply put on the server for
downloading by users of exe programs rather than scripts), a virtual
directory is created for CGI programs, with the attribute “run?
instead of the usual “read? Programs located in read directories
will not be started by the server and will be given to the browser
as usual files. (03.08.1999) | |
If the web directory have 'script' access
rights (in CommonSettings/AccessRights) and the file extension in
this directory have the associated builtin procedure name in the
ScriptHandlers(instead of extern program) - this procedure will be
used for that page processing.
In the default Eserv setup there is the InterpretHtml procedure,
associated with the '.html' extension. InterpretHtml will search in
the page commands of the builtin programming language, evaluate them
and insert result in the page. The Eserv Web-interface implemented
using this feature. The wwwroot\admin\ folder have script access
rights. In this folder there are html-files with special commands
within %...% chars. (24.11.1999) | |
CGI is the Common Gateway Interface. It
commonly used to extend web-servers.
Web-server can run extern exe-programs, give them parameters from
URL or from POSTed web-form, and insert result in the web-page,
displayed to user.
If the web folder have the execution (script) access rights
instead of ordinal read rights - Eserv will run files from that
folder instead just transferring them. If the file have exe
extension - Eserv will run it. If other - Eserv will run the
associated program from ScriptHandlers section. (24.11.1999) | |
|