| iMatix home page | Xitami home page | << | < | > | >> |
![]() Version 2.3d |
FAQs To Get Started With
Installing and Configuring Xitami
Windows 3.x Questions
Windows 95/98 Questions
Windows NT Questions
UNIX Questions
OS/2 Questions
Writing and debugging CGIs
Multihosting/Virtual Hosting
FTP Questions
Miscellaneous Questions
1: How do you pronounce Xitami?
Just say 'iMatix' backwards -- it's simple!
2: What are the main problems with Xitami today?
The main lack in Xitami is a UNIX-style security model: Xitami does not
use the setuid function, so runs as a root process if you want to use port
80. All CGIs and filters (like SSI) run under the Xitami user id, which can
also make a system insecure. This will be improved in future releases.
People also often ask for ISAPI and FrontPage support. We think that if
you want to be tied to a single platform (Windows in this case) you can use
the platform-specific server (IIS in this case). Xitami offers a long-term
approach, robust enough to survive several OS changes. For serious web-based
applications, look at Xitami's LRWP protocol. For industrial-scale work,
contact us about out iMatix Studio product. iMatix Studio is a
toolkit for developing portable high performance web applications. A technical white paper in
Word format is available.
3: How do I move my web site to a nice domain name?
See the Beginner's Guide chapter. You have to do two main things:
This is usually only worth doing if you have your own system, permanently
connected to the Internet, or you want to rent a 'virtual host' on someone
else's system. In the first case, your ISP can usually help set things up.
In the second case, the virtual host provider will be able to help.
1: When I try to use the /admin setup, Xitami asks for a password!
Edit the file called 'defaults.aut' to specify a password. See the
next question.
2: I've screwed-up my installation and nothing works - Help!
If you edited xitami.cfg, you have to get the original version back out
of the Xitami zip file or installation package. Under Windows you can use
Winzip or unzip to extract files from the .exe packages. If you only worked
through the BBA, you can delete defaults.cfg, then re-create two files:
3: I installed Xitami two days ago, and now I can't connect to it!
You probably set the server IP address to something. Delete the line
ipaddress=xxx in the defaults.cfg file. If you really grok it, delete
defaults.cfg. See the previous question.
4: Is there some way to disable the BBA completely?
Yes, set the security:admin option to 0.
5: Why does the installation replace my xitami.cfg and .aut files?
It has to do this, since new versions of Xitami may depend on updated
.cfg and .aut files. The important thing is to make all changes in
defaults.cfg, and this includes defining your own .aut file, so that the two
standard files can be reinstalled at any time.
The installation will not override other files, except those provided as
standard in the install package (e.g. default.htm). So, as a general rule,
do not modify anything that was supplied as standard, and if you're really
paranoid, make a backup before you re-install Xitami.
6: How do I install a new version of Xitami without losing my config?
Firstly, make sure you did not change either xitami.cfg or xitami.aut.
If you did change these, put your changes into defaults.cfg and
defaults.aut, and add this to defaults.cfg:
7: Can I install Xitami on a system that already has a web server?
If you are already running a server on port 80, you must configure Xitami
to run on some other port. Change or create defaults.cfg:
8: When I'm not connected to the network, Xitami is VERY slow!
Under Windows 95 and NT, your network configuration must match what's
really going on. One typical problem is that when you click on the Xitami
icon in the taskbar, it takes a minute or two before the Xitami window
appears. You may also get error messages when trying to point your browser
to 127.0.0.1. The bottom line is this: if you want to run your PC off-line
from the network, you must ensure that your PC's network configuration
matches. There are various shareware tools that help you to manage multiple
network configurations, for example NetSwitcher.
9: 'ping 127.0.0.1' works but I can't connect to http://127.0.0.1/
There are many possible causes of this problem. The ones we know:
10: I can connect to http://127.0.0.1/ but not http://127.0.0.1/admin
There are many possible causes of this problem. The ones we know:
11: Why does 127.0.0.1 not work with proxy servers?
The problem is that if 127.0.0.1 is passed to the proxy server, it can't
resolve that back to your local machine. You can configure your browser so
that certain addresses (127.0.0.1) are not passed to the proxy. This is
actually the browser being really silly, because this address never means
anything else than 'this machine'.
12: What's the 'document root'?
The document root is the directory where the main files are. For example
if someone asks for a file "http://somehost/index.htm", this is taken to
mean 'index.htm in the document root'. This is usually the directory called
'webpages' in the Xitami directory. So if you installed Xitami in c:\xitami,
the index.htm file would actually be in c:\xitami\webpages\index.htm. This
webpages directory can itself contain subdirectories, of course.
13: Do I need two computers to use Xitami?
You can use one computer as a server, and one as a client if you like,
but you can also use the same computer as client and server. Xitami is so
small and fast that you can develop Java or CGI programs on the same system
you test them on, and you will not notice any slow-down. This is also a
simpler way of working than always copying your webstuff to another machine.
Just set your Xitami cgi-bin option to point to the directory where you
build your executables, or the webpages directory to your HTML directory
root.
14: Can I run Xitami on stand-alone machine?
You can certainly run Xitami on a stand-alone system. It is a Good Idea
to have TCP/IP networking installed (on a PC, go for Win95, OS/2, or Linux,
which have TCP/IP built-in, instead of Win3.1 which is crippled in this
area). You must install TCP/IP correctly and at least have a dial-up adaptor
(software) configured. The 'ping localhost' command must work. Under Windows
the winsock library may want to dial-up when you initialise it (e.g.
connect from your browser), but this can be configured (in the browser or
Internet control panel) to not be necessary.
15: Can I use Xitami over an ISDN or dial-in connection?
Yes, if TCP/IP works and the 'ping' command does something useful. The
Same goes for X.25, frame-relay, carrier-pigeon, and telephone drums.
16: How do I change my IP address?
By default, Xitami accepts connections on any available IP address.
If you have multiple IP addresses, Xitami accepts connections on all of
them. More usually under Windows you have only one network card, only
one IP address (though with a dial-up connection you have two interfaces
and two addresses). You can also configure Xitami to accept connections
on a specific address only.
17: Xitami is reporting the wrong server address!
Xitami gets its name from the operating system. Check the TCP/IP
configuration and especially the computer name. You should be able to
test this using the 'ping' command in a DOS box. Eg. 'ping mysystem'.
18: How do I tell Xitami to use my domain name?
Xitami works with any of the IP addresses available on the system. It
does not care what the domain name is, and there is no way to define this
within Xitami. (When you use virtual hosts the situation changes a little:
there the domain name is used as a key to chose which virtual host to work
with.)
19: Can I set my hostname in xitami.cfg or defaults.cfg?
You cannot set your system hostname here. You have to get this
working at the level of TCP/IP itself, e.g. by using the hosts file or
a domain name server (DNS). However, you can specify the hostname
that's used in redirected URLs, and this is important for virtual hosts.
20: My server keeps starting on port 160, why?
Set server:portbase to 0, or remove the line. The HTTP port is at
portbase+80, and the FTP port at portbase+21.
21: Why does 'http://address/directory' does not work?
This should work. Set server:debug to 1 and see what's going on in
debug.log. If you're on a PPP connection try setting server:translate
to 0.
22: Why do my aliases not work?
Set server:debug to 1 and see what's going on in debug.log. The BBA pages
provide a 'test' facility where you can type an URL, and Xitami tells you
what disk file it would be translated to.
23: How can I change the error 404 message in Xitami?
Edit the file errors/text-404.
This is just name for the portable, command-line version of Xitami.
Usually we use this term in contrast to the Windows GUI versions of the web
servers, which provide a graphical control panel for the web server.
25: Why is Xitami.aut not encoded?
This is a temporary situation: we plan to release an update in 1998 that
uses encoded (hashed) passwords for better security. The password file
itself is not accessible to browsers, unless you specify the Xitami root
directory as its webpage directory, which would not really be a good idea.
There are also advantages to plain-text password files: it is simple to
manage these using scripts.
26: Can I use 'home.html' instead of 'default.htm'?
Change the defaults.cfg file server:defaultn options. You can
specify anything you like: begin with 'default1'.
27: What is defaults.cfg? I can't find it anywhere!
Up to v1.3a, people had to modify the pre-supplied xitami.cfg file. This
worked fine until they installed a new version, at which point they could
start again. Defaults.cfg is not supplied with the server - you just copy
the part of xitami.cfg you want to modify. Eg.
28: Why does my webmask (!xx.xx.*) not work?
The webmask is a bit pedantic. This mask forbids all hosts in a certain
domain, but does not allow other hosts. Follow it by ',*' to allow
all other hosts: webmask=!xx.xx.*,*
29: How do I make my server run faster?
Make sure the server:keep-alive option is enabled. Add lots of RAM to
your system and make sure this is available to your operating system disk
cache. Put your web site onto a RAM disk. Don't use lazy, slow CGIs,
especially ones that search large databases. Change the priority under
Windows NT to 'High'. Raise the keep alive limit to 100 or more under
Windows NT, or Unix (not under Win95 or your system will have problems).
30: I want each user to have FTP access to their personal web pages
You do not need aliases. Simply assign each user a subdirectory of
the webpages directory, then specify this directory as their FTP home
directory (using a full path).
You can also do it using aliases: create HTTP aliases which point into
the FTP space. So, user Joe gets a FTP directory: 'ftproot/joe'. Then
define a HTTP alias:
31: Does Xitami support http://ipaddress/~username?
The ~username syntax is a UNIX thing; UNIX usually translates ~username
into the home directory for a user. If you run Xitami under UNIX, this will
work automatically (I think). Under Windows, ~username means nothing; there
are no user home directories. However, you can get much the same effect by
creating a subdirectory for each user underneath the webpages directory.
Then, you use the syntax: 32: In FTP, 'ls' fails from a remote system (it works locally)
This is probably due to the remote machine being hidden by a router or
firewall which prevents return connections from the FTP server to the
client. You should use passive mode for such connections. The next release
of Xitami handles this situation better, but the basic problem is
unsolvable; if the client is behind a firewall or router that does not allow
reverse connections (i.e. server to client) then the default FTP protocol
does not work correctly.
33: No-one can get to my server. I can get in, but no-one else can
From Paul S R Chisholm and others...
The 'ping' command (from the client to the server) is the simplest way
to make sure that there is a TCP/IP connection actually established.
However, because of "ping of death" attacks that have become popular over
the past year or so, a lot of routers have been shutting off ICMP. Thus,
ping doesn't work. traceroute (a.k.a. tracert) doesn't work either. This
last one really hurts, in my experience. There are other things to try:
You can still try ping and traceroute/tracert, but their failure may not
mean anything. (Their *success* is encouraging.)
Another possible problem is that your server is behind a firewall or
proxy server which is preventing HTTP access (it may even allow ping to
work.) If this is the case, see your network administrator for help.
34: Why does the Restart function not work?
Some functions are not affected by the Restart function. You cannot
modify the HTTP port, nor can you enable or disable the FTP service through
this function. If you find that the Restart function has no effect on the
configuration change you made, you will need to stop and restart the server
program fully.
35: I get the wrong default page, even if I change the webpages root!
If you load a default page, the browser caches it under a URL name with
no filename, e.g. 'http://localhost/'. If you then switch to another
webpages root and request the same URL, the browser will compare dates and
load the current default page only if it's more recent. You'll often find
that requesting the full filename will work correctly. This problem can
occur if you upgrade to a new release of Xitami, then take a look at the
'Welcome to Xitami' default page. If you then switch to your own config,
the browser won't show your default page. This problem can also happen if
you run Xitami with different webpage roots, for instance to test different
sites. The solution to the first case is to flush the browser cache. In
the second case, disable the server:cache_defaults option.
36: I want several 'sites' on the same IP address, on different ports
You can run several copies of Xitami, each in a different directory, and
each on a different port. Xitami is small enough that this will not slow
down the system. In each directory, create a suitable defaults.cfg file
with the server:portbase set to a different value.
37: How do I use Xitami on several different web projects?
It's common to use Xitami to test different web projects on the same
system. Generally we create a suitable root directory with the
defaults.cfg, authorisation, and other site-specific files, then run Xitami
in that directory. Put the Xitami executable on the path. You can also run
the Xitami command-line program (For Windows, xidos32.exe) with command-line
options to set the webpages, cgi, and ftp directories (-r, -c, -f). It's a
good idea to set the server:cache-defaults option to 0 if you use this kind
of setup, so that default pages are always loaded correctly.
38: Where can I get (just) primary & secondary DNS hosting for cheap?
Try the public DNS service at http://soa.granitecanyon.com/. It's free.
You can also try using a .nu domain instead of a .com one. Go to
http://www.nunames.nu for info. They also link to a service that does the
full DNS service for $49.95/year. nunames updates your DNS info with an
interactive program right on their web site and it's effective within 24-48
hours. Similar services are available at www.tonic.to.
1: Xitami does not work - why not?
You need a TCP/IP winsock.dll. And it has to work. And it has to be
configured correctly. If you have any kind of difficulty running Xitami
or connecting to it, use the PING command to debug your TCP/IP
configuration. First, use 'ping 127.0.0.1' to check that TCP/IP is
working. Then, use 'ping localhost' to check that winsock.dll is
working. Next try ping with the system name that Xitami displays.
Then, try this command from another system. All these must work before
you can use Xitami.
2: 'Could not open HTTP port 80 - Protocol not known'
Your TCP/IP protocol is not correctly installed. Ping must work!
This is typically caused by inadequate winsock dialers that have incomplete
support for server applications. Try Trumpet winsock, which we've been
told works.
3: Are there still plans to introduce CGI for Win 3.x?
No. We are moving off this platform in the long term. You'll find that
the 32-bit console version of Xitami runs pretty well under Win32s, although
CGI does not work due to filesystem incompatibilities. You can
write LRWP programs under Win32s.
4: Why does xiwin16.exe use all my CPU?
When idling, xiwin16.exe spends most of its time waiting for incoming
socket events. Under Windows 95 or NT, a 16-bit program that is waiting for
socket events looks like it is sitting on the entire CPU. Maybe it is.
Anything can happen in this business. However, as far as we can tell, the
program really is idling, and does not slow-down the system. If this bothers
you, move to Windows 95, and run the 32-bit version of Xitami. This uses
Windows threads (as well as its own internal multithreading) to reduce CPU
consumption to 1% or less when idling.
4: Can I use my Win95 system as a real server?
A decent web server like Xitami does not need large amounts of memory
or a blazing CPU. You can happily serve a group of several hundred
users from a 486 PC with 16Mb memory. If you want to run heavy CGI
programs, you'll need a faster system. Also, a fast hard disk is a good
idea. And of course, any server is limited to the speed of the network.
Given a fast hard disk and a fast network, Xitami will be able to handle
several hits per second even on a slow 486 PC, and dozens of hits per
second on a fast Pentium. (One hit per second is equivalent to about 20
users actively browsing, at the rate of a page per minute where a page
requires about 3 accesses. If an average user browses for an hour a day,
one hit per second thus translates into 100-150 users.) Note that the
earlier releases of Win95 are not really too stable.
Note also that Win95 and Win98 appear to be unstable when they are very
heavily loaded; this does not happen with WinNT, and we assume this is done
deliberately, since in principle the TCP/IP code is shared between these
systems (at least the later Win95 releases).
1: 'Could not open HTTP port 80 - Protocol not known'
Your TCP/IP protocol is not correctly installed. Try these steps:
2: 'Port is already used by another server (WSEADDRINUSE)'
You are running another web server (perhaps MS PWS) - remove it then
run Xitami. In some cases you may have to edit the registry; look for
a key 'Runservices' and delete any references to previous web servers.
3: How do I use Xitami with a PPP connection?
Presumably your problem is that the PPP connection is allocating IP
addresses dynamically. This makes it hard for anyone to know where your
machine is in advance. Ask your ISP if you can get a fixed IP address -
though the chances are slim. You can use ping to find-out what your current
IP address is. Xitami shows you the local system name - use that as an
argument for ping.
4: Tips for using Xitami with dynamic IP addresses
From Alex Feinerg a.k.a Yoonicks@EFNet and others...
5: Tips for using a dial-up IP connection
6: Ping will find 127.0.0.1 but not myhost.com
Ping is a good test to see if your computer name can be translated
correctly. If you're on the Internet, you need to ask your Internet service
provider to make the necessary DNS entries. On your own PC, you can edit the
'hosts' file in the Windows directory. The file 'hosts.sam' is a sample that
you can rename to 'hosts'. Then, add your machine name and 127.0.0.1. This
may not always work; address translation may require that you are actually
on-line. For instance, I can 'ping 127.0.0.1' at any time. When I try to
'ping localhost', I get the TCP/IP dial-up dialog. I can Cancel this, and
then 'ping localhost' works. But to ping my machine name, I must be online.
7: How do I debug my Windows network connection?
Windows 95 includes two tools besides ping to test TCP/IP connections:
tracerout and winipcfg. With tracert, you can follow the route for a TCP/IP
connection. Open a DOS prompt and type the command: tracert
somehost.com. The program shows the route to the host, up to 30 hops.
Type tracert with no arguments to get help. Winipcfg shows you your IP
address(es) and some more information about your network. Just type
winipcfg; it's a Windows program.
8: Xitami just sits there blinking between 'Running' and 'Suspended'
The server is trying to start up, but there is a problem with the TCP/IP
connection. Since its default reaction (prior to release 2.3c) is to wait
and try again, it blinks between 'Running' and 'Suspended'. You can edit
the defaults.cfg file to include these lines:
9: Xitami always returns '403 Forbidden' on my URLs
For reasons of security, Xitami does not allow access through short
filenames when a long filename is defined. The xitami.log file will say '-
request refers to an illegal filename'. Using a shortened filename is
otherwise a cute way to bypass security on a URL. One consequence of this
security check is that if you use short filenames in your alias or webpages
definition, all requests through to those files will be rejected with a 403
error. The solution is to use the full long filenames in alias or webpages
definitions.
10: How do I change my 'web server address'?
Xitami gets its host name from the operating system - i.e. Windows. Your
IP address is not something that Xitami can change or choose. Check your
network configuration and if neccessary, ask your network administrator. The
same applies to the hostname that Xitami displays. This is the name of the
system as supplied by Windows. You can change this in the network control
panel.
11: My web server address is 'http://default/' - why?
Check the TCP/IP configuration; your system is probably called 'default'.
12: Can I run RealServer on the same system as Xitami?
Yes, but change RealServer's port from 80 to something else (e.g. 1024).
13: My 16-bit CGI program does not output anything
You cannot correctly run a 16-bit CGI program that is on a path with
'long filenames'. For instance, if you installed Xitami in 'C:\Program
Files\Xitami', then put a 16-bit CGI into the cgi-bin subdirectory, it will
run, but its output is lost, and the browser will eventually time out and
show a message like 'Document contains no data'. The fix is to either move
Xitami to a directory like 'C:\Xitami' or create a CGI alias and put the CGI
programs elsewhere than under the Xitami root.
14: How do I use the FrontPage extensions with Xitami?
The FrontPage server extensions are not documented and as far as we have
been able to test, they do not work with Xitami under UNIX or under Windows
NT. Support for specific servers appears to be added at the whim of
Microsoft, so you may want to try writing Bill Gates a sweet letter.
15: Win95 crashes with a GPF in VxD IFSMGR(01)
Upgrade to a more recent version of Windows 95. There are several known
problems with the winsock library and Win95 kernel in pre-1998 releases of
Win95.
16: Win95 crashes with a GPF in WINMM.DLL
Check whether you are running Win95 with service pack 1 (also called
OSR-2.1). In 'My Computer', select Properties, and you'll see the version
number. If you have 950a (service pack 1), you need to upgrade to 950b.
As far as we know this is only available as an OEM CD-ROM.
17: When I access my local site, it takes 3-4 minutes to load!
Change the Internet Control Panel not to autodial. (In MSIE3, choose
View, Options, Connection, and clear the option 'Connect to the Internet as
needed'; for MSIE4, tell it you have a LAN connection, not a modem
connection).
18: Why does Xitami use all my CPU?
You probably set the priority to 'High'. This is excellent if you do not
use the system for anything else, but is not a good idea if Xitami shares
the system with other users. At high priority, Xitami will consume most of
the CPU time during large downloads. We do recomment High priority for a
dedicated web server, and 'Normal' for a mixed-use system.
19: How do I reinstall just one file from the Xitami kit?
Use unzip (WinZip, etc.) on the installation .exe file. This file is
compatible with the zip format.
20: Xitami is reporting errors on its control panel
Xitami reports 'Not Found', and any other 3xx, 4xx, or 5xx return
code as an error on its control panel.
21: Can I run multiple instances under Windows?
You can run multiple instances of xiwin32.exe or xidos32.exe in separate
directories (each with its own web space, config files, etc) and specify the
portbase either on the command line or in the defaults.cfg file.
22: IE sometimes fails with multiframe documents
Microsoft IE 3.0 has occasional problems mixing keep-alive connections
with highly-framed documents. The symptoms are that the last frames will not
display. IE opens a connection, asks for a document, but prematurely closes
the frame. Workarounds: use Navigator, a more recent version of IE (we
assume the problem may be fixed), or switch-off keep-alive if you are using
heavily-framed documents.
23: Windows says 'URL.DLL not found' when I choose 'Setup'
URL.DLL is a Windows DLL that is installed as part of TCP/IP networking,
and allows you to double-click a .htm file to launch a browsers. Xitami uses
this technique to launch a browser when you click on the 'Setup' button. You
can either try installing TCP/IP networking (again) or start a browser and
enter the URL 'http://127.0.0.1/admin' yourself. This file may only be on
the OSR/1 release of Windows, or may be supplied with MSIE or Navigator 4.
24: Why is Windows ignoring my changes to the hosts.sam file?
This file must be called "hosts", without an extension.
The CGI/Win protocol (which Xitami does not support) uses a mechanism for
transferring the stdin/stdout and environment data that is different from
the normal CGI manner. It's meant to support languages like Visual Basic
that do not have access to stdin/stdout streams.
26: Do you know of a good free e-mail server for Windows?
Thomas Schroeter says: On www.freeware.com, I found a very good server
(VPOP3) which includes POP 3, SMTP, finger connections, forwarding accounts
and autoresponders. The program has a lot of settings (user accounts,
headers, listserver, logging, error reporting, ...). It runs with Windows 95
and it's very fast. Now, I'm using Xitami and VPOP3 together - both programs
are working very well in my local network.
Justin Scott 27: Do you know of a mail client for Windows?
David Lau says: wSendmail is a tiny Win32 utility that sends e-mails
from the command line - or you can use the program directly as a standard
CGI-BIN app. In CGI-BIN mode it will pick the data from your HTML Forms and
send it all as e-mail to whoever you choose. There also is a Perl .cgi script
from Jeff Marriott/NZ that demonstrates and uses wSendmail. This can be useful
for experienced UNIX Perl programmers when migrating to Win95/NT.
wSendmail is located at http://www.jgaa.com/cgi-bin.htm
A shareware alternative is WindMail. See http://www.geocel.com/.
28: Any hints for boosting Xitami's performance?
29: Why does Win95 insist on running 'service.bat'?
Xitami installs this batch file when you install the Xitami Console
version as a Windows 95 service. The service.bat file simply sets the
correct working directory, then starts Xitami. To disable this, you can edit
service.bat to remove the call to xidos32.exe. You can also remove the entry
for service.bat in the registry; run regedit and find the key
SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices. You'll see a
definition for service.bat, which you can delete.
1: My 16-bit CGI program does not output anything
Under Windows NT, you cannot run 16-bit CGIs at all, due to a limitation
of the Windows 32-16 bit interface. A simple workaround is to use a batch
file like this:
2: The Xitami service can't access a network drive
The problem is one of security; the service runs under the account
'system' by default, and this may not have access to your network drive. In
the Services control panel, you can change the start-up options for the
Xitami service so that it logs-on as a user with the necessary privileges.
3: The Xitami service fails to start, saying 'Access is denied'.
You should install Xitami when logged-on as administrator. You can fix
this quite simply. In a DOS box, go to the Xitami directory and type
'xiwinnt -u' to uninstall the service. Now log-on as administrator and use
'xiwinnt -i' to re-install the service. If you still have the problem,
de-install Xitami completely, and re-install after logging-on as
administrator.
4: How do I remove the Xitami icon in my control panel area?
When you installed the Xitami service, it installed the Xitami control
panel file in the Windows System directory. Delete the file called
'xiwinntc.cpl'. If you install and uninstall the NT service version, this
file gets left behind due to an access conflict (which we have not
figured-out how to resolve). (Details: if you use the 'Add/remove software
components' control panel option, then the Xitami CPL is loaded, and can't
be deleted...)
1: I defined a new VH and now my NT service won't run
Check that the specified .aut file exists, even if it's just empty. Check
the Xitami log files for error messages. If in doubt, run the console
version to see what error message is being produced.
1: Xitami does not build on my XXXX system
Xitami should build on: IBM AIX, Digital UNIX, HP/UX, Sun Solaris, SCO
OpenUNIX, SCO OpenServer, FreeBSD, NetBSD, Sinix, and of course Linux.
Anything else is unexplored territory, and that includes the future, since
some of these systems are starting to come without an ANSI C compiler as
standard.
2: Can I run Xitami from my ISP telnet account?
Yes, if you have access to an ANSI C compiler. Build Xitami as usual, and
run it with a command like this: 'xitami -b 5000 -s'. Avoid port 8080 which
is often used for proxies. You may also find that the ISP kill all
long-running processes at regular intervals (e.g. midnight). The -s switch
runs Xitami in the background; it's a bit cleaner than using 'nohup'.
3: Does Xitami support .htaccess with per-directory access control?
No, Xitami uses its own .aut files for access control.
4: Does Xitami use setuid to run as a non-root process?
No, currently you must run Xitami as root if you want to use port 80; you
can run it as a non-priviledged user if you want to use ports higher than
1024.
1: Xitami does not start, and 'ping 127.0.0.1' does not work
Check the interfaces and routing with "netstat -r"; a "127.0.0.1"
host with the interf(ace) of "lo" ought to be present if it is going
to work. The following command ought to establish a loopback
connection: "ifconfig lo 127.0.0.1 up".
2: Xitami reports 'too many open files'
Add this environment variable definition 'SET EMXOPT=-h120' before running
xitami.exe.
There must be hundreds of places to get a good answer to this question.
Look at the example programs in the cgi-src directory.
2: When I run a CGI program, my browser seems to hang
If you have enabled Keep-Alive in the server, every HTTP response must
contain a valid 'Content-Length' header. When Xitami builds the HTTP header
itself, this works fine. But you can build your own HTTP header in a CGI
program -- see the testcgi1.c example. This is difficult to combine with
Keep-Alive, unless you carefully calculate the size of the generated text
and generate your own Content-Length header.
3: Does Xitami have an API like ISAPI or NSAPI?
We support WSX and LRWP. These are portable protocols: WSX lets you
build plugins that are linked into the server; LRWP lets you build external
peer processes that handle specific URLs. WSX programs are written using
the iMatix SMT library, in C. LRWP programs can be written in C, Java,
Python, Perl, or any other language that supports sockets.
4: How do I tell Xitami which files are CGI programs?
With some servers you have to configure the server to recognise executable
files. For instance with Apache, one uses the AddHandler directive to say
that a filename extension should be treated as a CGI script. For example
"AddHandler cgi-script .cgi".
Xitami, in contrast, will execute anything it considers executable and
which is in a CGI binary directory. Special directives are not needed. Under
Windows, files with extension .exe or .com or .bat are executable by
default. Otherwise, files that start with #! and the name of an interpreter
are executable through the interpreter (typical example: Perl scripts).
Otherwise, files starting with the magic letters 'MZ' are also considered to
be executable. Under Unix, executable files are de-facto marked by a
protection bit, which makes things a lot simpler.
You can add support for special kinds of CGIs by using the [Filter]
configuration section: this allows you to execute a file by passing it to
some interpreter.
5: How do I debug CGI programs?
In many cases you can run the CGI program from the command-line,
providing test data to the program using the '<' redirector. It's also
possible to use a debugger. For example, under Windows I use the MSVC
compiler for C CGI programs. To set a debug breakpoint I insert a call to
DebugBreak() at some appropriate point in the program. This launches the
debugger and I can then step through the code. If you use this technique, be
sure to set the cgi:timeout high enough so that Xitami does not think your
CGI program has started to loop (it will then kill the process, and leave
you with a very confused debugger).
6: Any quick hints on installing Perl for Windows?
Install Perl in some directory, and make sure the PATH includes
the Perl bin directory. Define the PERLLIB environment variable to include
the Perl lib directory (this lets Perl find its library files). The command
'perl' must work when you're in a DOS box in the cgi-bin directory, and you
must be able to run your Perl CGI scripts using 'perl xxxx'. Then, check
that the header of the CGI scripts start with '#! perl'.
7: Why does my Perl CGI not run?
This is a check list that may help you.
8: Why does my Perl CGI not work from inside an SSI page?
The current SSI filter, perlssi, requires that the CGI script starts with
'#! perl' and that perl.exe be on the path. You can also specify the full
Perl pathname. Note that Xitami is more intelligent and will handle stuff
like '#! /usr/bin/perl' gracefully on a system where /usr/bin does not
exist. Perlssi is simply not this smart.
9: When I try to run a Perl CGI, my browser says 'Save to disk?'
You must let Xitami know that the script is executable, rather than a
text file to be sent to the browser. Make sure the script starts with
the magic '#! perl' line.
10: My BASIC .exe CGI does not work
Some languages do not write their output to the stdout device,
but directly to the BIOS. Try 'myprog > xxx' and if the output is
still being sent to the screen, consult your documentation. At a
pinch, use the CGI_STDOUT environment variable to determine the name
of the expected output file, and write directly to that file. If
you do this, makes sure you set cgi:stdio to 0.
11: Why do I get 'HTTP/1.0 502: Service temporarily overloaded'?
Increase the cgi:timeout value. Your CGI is taking so long that Xitami
reckons it's looping with intent, and kills it (after giving it the
customary fair trial, of course). ('Looping with intent' is a Legal Term
that means almost exactly, but not quite totally, the opposite.)
12: Why is the REMOTE_USER not correctly filled-in?
Make sure your directory is password-protected. You can put the CGI
script at any level under a directory like 'private', so long as the URL
contains '/cgi-bin' somewhere. If you access a CGI without an
authentication check, the REMOTE_USER will contain arbitrary junk; typically
the last user id that was used to access a protected resource.
13: Why is the HTTP_REFERER not correctly filled-in?
Variables starting with HTTP_ come from the browser (unless you changed
something you were not supposed to). For instance, the browser will usually
provide its own name rank and serial number in 'HTTP_USER_AGENT'.
HTTP_REFERER is filled-in if you choose a URL from another page, but not if
you type it by hand.
14: When I generate images in my CGI program, LF becomes CRLF!
By default the stdout for a program is handled as a text stream. This
is easy to change. First write the HTTP header, then (in C):
15: Must I use /cgi-bin in CGI URLs?
You can redefine this by changing the server:cgi-url option. As
usual, modify this in defaults.cfg, not xitami.cfg.
16: I want to put some CGIs in another directory, e.g. /htdocs/myscripts
Define a CGI alias.
17: How do I use a CGI program as a default page?
18: How do I set-up a web site counter?
Use a web site counter like
this one for
Windows 95.
19: How do I make a CGI file executable for DOS?
There is no equivalent to the UNIX 'chmod' command under DOS/Windows.
After considering various techniques (e.g. looking at the extension), we
decided that the UNIX execve technique was the simplest; i.e. the script
specifies what interpreter to use. Actually if you want to see the code that
decides this, look at the SFL code in sflfile.c -- file_is_executable ().
The UNIX technique works for Perl, Awk and presumably shell scripts, and
with a little tweaking, for Rexx too. Finally, we take a peek at the file
contents if necessary. Under MS-DOS & Windows, a real executable starts with
'MZ'. That's sufficient for Xitami to try to run the thing. Conclusion:
executable files can take any extension and work with pretty much any
processor/interpreter.
20: I tried compiling testcgi.c but it wants sfl.h?
The example CGI programs in C use the iMatix SFL library. This is
included in the Xitami source kit (since Xitami also uses it). You can
download it from our site.
21: How do I use an URL like '/cgi/script'?
You can set this option in the [Server] section of custom.cfg, in
the cgi-url option. Try this:
22: Can I redirect users to different pages using the .aut file?
No, not without CGI programming. But it's quite simple to do in Perl or
C: you test the user name (forget the password - it's already been
validated) and return a header that redirects the browser to the actual
page: "Location: /somedir/somefile.htm". Use the environment variable
REMOTE_USER, which contains the user id.
23: Can I trap the user id to subset data?
In a CGI you can use the user name to subset data: you could issue a
redirection to the appropriate file, e.g: Location: filename.htm depending
on the value of the REMOTE_USER environment variable, or use this variable
to determine what data to read from a database.
24: I want to limit CGIs, but not HTML pages, to certain IP addresses
Add this to the authentication file:
25: How do I allow CGIs in any regular HTML directory?
Set the server:cgi-url option to "/", and the server:cgi-bin option to
the same as the server:webpages option. Make sure cgi:mixed-url is 1.
26: My CGI program can't connect to ODBC under Windows NT; it works from the command line
Under NT, each login ID has its own set of ODBC definitions. The reason
your program works from the command line is that it runs under your current
login ID, which apparently has a proper ODBC definition to utilize. The
Xitami web server runs as an NT service and does not use your login ID by
default. Xitami and all CGI programs launched from within it assume the
login ID assigned to Xitami at start up. This can either be a system ID,
which is typical, or a specified user ID, which requires extra configuration
by an NT administrator.
The solution is to have an NT login created specifically for Xitami. It
need only have the standard User privileges (assuming your NT environment
uses the default definition of "User"). After this login is established, one
must use it to login and then define a proper ODBC connection. Next, Xitami
must be made to start as NT service using this new login instead of a system
ID. Since this new login ID does not (or at least should not) have
administrative rights, one will have to logout and log back in as an
administrator to change this setting, which is made from the Services
component of the Control Panel. Now when CGI programs run, they will do so
under the new login ID, and will consequently have access to the new ODBC
definition.
27: When I run a heavy ODBC CGI program, I get "Server Overloaded"
Your problem is that the CGI program runs 'too long' and is then
killed by Xitami. Increase the CGI timeout (which is specified in
seconds).
28: My images don't load when my CGI uses extra PATH_INFO
When you run a CGI that contains extra path information (the PATH_INFO
environment variable), images on pages generated by the CGI will fail to
load if they're referred-to by relative URLs. For example, if the CGI URL
is http://my_domain/cgi-bin/my_prog.cgi/extra-blah, and you refer to an
image "pic.gif", the browser will ask for a URL called:
http://my_domain/cgi-bin/my_prog.cgi/extra-blah/pic.gif, which presumably
won't work. You can check this by enabling server debugging and looking at
debug.log. There are two solutions:
29: How do I do file uploads through CGI?
Find the Internet document RFC1867. This is the kind of FORM code you
need:
Form-based file uploads do not work in IE3.x and earlier, and we have
reports that it fails with some IE4 configurations. Netscape 3.x and later
work fine. Opera 3.x does not handle this. Therefore, we recommend that
you use this carefully and probably best within an intranet setting where
you can be sure of the type and version of browser used.
2: What exactly do I need to define for a Virtual Host?
For the main configuration you have xitami.cfg+defaults.cfg. For each
virtual host you have some XXXXX.cfg. For unresolved virtual hosts you have
basehost.cfg. Use the BBA Virtual Host Wizard to define new virtual hosts.
3: How do I set-up a virtual host on another port?
You can do this quite simply by starting two copies of Xitami. We do this
quite often; the advantage is that you can get the effect of multiple hosts
(different document roots) without playing with the DNS system. Otherwise,
you have to define DNS entries that map several different names
'www1.here.com', 'www2.here.com' to the same IP address, then base the
virtual hosting on the different names. Either way is okay; Xitami is so
small that running two or even a dozen copies will not stress a system.
4: How do I provide space for individual users on my system?
Let's say you installed Xitami in c:\servers\xitami. Then, the main
webpage directory will be c:\servers\xitami\webpages. An URL like
'http://dynamic210.adelphia.net/Joe' is taken to mean something like:
'http://dynamic210.adelphia.net/Joe/index.htm', which would be a file:
'c:\servers\xitami\webpages\joe\index.htm'. You can also use
default.htm, and you can change the main webpages directory to be
somewhere else if you want. Under Windows 95 and NT you can make each
subdirectory shareable separately, so that users can update their pages
but not mess with other files. You can also use aliases, especially if
users' pages are on different disks.
5: And how about their CGI scripts?
Any URL containing /cgi-bin/ is treated as a CGI directory. So, Joe
can put his web pages in "c:\servers\xitami\webpages\joe\" and his CGI
programs in "c:\servers\xitami\webpages\joe\cgi-bin\".
1: How do I use my D: drive for additional FTP space?
You can move the entire FTP root anywhere you like - this is one way.
You can also define any number of FTP aliases, which point to
different file systems, CD-ROMs, etc. You can also put different
FTP users' directories on different disks. For instance if I log in
to 'anonymous', you could set my home directory to d:\anon.
2: How often does Xitami read the FTP user file?
Xitami reads this when it starts up, when you restart it, or after the
refresh timeout (30 seconds by default).
3: If I give a user only 'P' access to a directory they can't list it
Normally you'd use 'P' by itself for a directory meant purely for
uploads. I.e. a userid 'uploads' with a dedicated write-only directory.
If you use 'P' by itself on a subdirectory, the user will not be able to
'cd' into it.
4: I'm having problems getting my FTP permissions right
The FTP permissions definitions are quite complex and it's easy to get
these wrong. The most common mistake is when you define directory-level
protections. For instance, if the ftproot is in 'ftproot', and a user
'guest' connects to 'guest' (a subdirectory of ftproot), then how do you
specify the protection for a subdirectory 'guest/pub'? The correct form is:
To debug this kind of problem, enable server debugging, then check
debug.log. It'll indicate the actual permissions that were used to access
the directory.
1: Why do I get errors on 'robots.txt'? What is this?
The various search engines (like AltaVista) use a 'web spider' or 'robot'
to scan and index websites. This often includes large amounts of junk that
make the resulting searches pretty useless. So, a standard mechanism has
evolved to make this work better. The 'Robot Exclusion Standard' specifies
that a file called 'robots.txt' in the home directory will indicate which
pages or directories should be ignored. This is not meant as any kind of
security device, just a 'hint'. So, most robots will ask for this file. If
the errors in the log files bother you, create an empty file in the webpages
directory called 'robot.txt'.
2: How do I use the Xitami log files?
There are many freeware and commercial logfile analysers; the Xitami
access logfiles are NCSA/HTTPd compatible and thus compatible with most
logfile analysers. The Xitami.log file is used for server messages and
thus not suitable for analysis.
3: Why does access.log contain only numeric addresses?
Xitami does not yet translate IP addresses into names since this is
very slow unless done asynchronously, and that's a lot of work. The Xixlat
translator (supplied with Xitami) will do very fast log file translation.
4: My log file has this strange URL: webpages/http://hostname/file.htm
This is caused by the browser (usually MSIE4) sending a HTTP1/1 proxy
request. Xitami can not (yet) handle these. This usually indicates that
someone has defined your web server as a proxy server.
5: What's the logic behind the log file naming scheme? Is there any?
The log file naming schema is an attempt to manage what can become a
large number of files with pretty arbitrary names. This is how it works:
6: I can't access the log files while Xitami is writing to them!
This is normal behaviour under Windows. Under Unix and OS/2 you may
have more luck.
7: How do you create those .tar and .tgz files?
We use GNU tar and gzip under Windows NT to create these files, including
the UNIX kits where I first run a script to prepare the source files and
strip-off carriage returns. The combination of tar+gzip offers much better
compression than the 'standard' zip format since the tar file is effectively
handled as a single file. You get a better compression ratio by compressing
a set of files combined into one file (a tar) than by compressing each
individual file (standard zip): patterns repeat more often. You could use
tar+zip just as well (I do this for the UNIX kits). The drawback of
combining tar+(g)zip is that you cannot manipulate the archive easily (e.g.
delete or add files). However, it's an excellent approach for distributing
sources. Under Windows, the WinZip program will handle all these and other
formats. You'll also find many free tools like the GNU utilities and free
Zip tools.
8: Do I need a special license to use/sell/modify Xitami at work?
No, none. Read the Xitami license.
9: Why does iMatix.com use Apache, not Xitami?
iMatix.com is hosted by AZC, an (excellent) web hosting company. They
use a customised version of Apache for speed and security.
10: Why are there bugs in Xitami?
Any complex software is filled with bugs. Xitami is pretty good in this
respect, we reckon. Our policy is to fix those we can identify and localise,
depending on the severity of the problem. A bug that causes the server to
crash will make us run around a lot faster than a bug which causes some
obscure feature to work otherwise than documented. Large amounts of money
will also tend to focus our attention.
11: Where can I get older versions of Xitami?
We keep one back version but not older ones. You may be able to find
a specific version by searching through an FTP search engine like the
one at http://ftpsearch.ntnu.no.
12: Do you have any plans to incorporate SSL into Xitami?
This will be supported in Xitami Pro, a commercial version of Xitami
that is planned for mid-1998.
13: What is the future for Xitami?
Our plans include:
FAQs To Get Started With
Installing and Configuring Xitami
Now use userid 'admin' and password 'verysecret' to access the BBA and
reconfigure Xitami.
[Security]
filename=defaults.aut
[/Admin]
admin=verysecret
[Security]
filename=defaults.aut
In principle you can now re-install Xitami safely. The installation will
not overwrite anything else you modified. For safety, make a zip of the
whole Xitami root before re-installing, just in case.
[server]
portbase=1000
will run Xitami on port 1080. The portbase is also added to the standard
FTP port of 21 to give, in this case, 1021.
[CGI]
debug=1
[Aliases]
joe=ftproot/joe
Which points all URLs starting with '/joe' into this directory.
http://ipaddress/username/
Windows 3.x Questions
Windows 95/98 Questions
[server]
autostart=0
which disables the autostart function. You can also check the xitami.log
file to see what error messages Xitami has logged. If you get a message
like 'Port is already used', check that no other web server is already
running.
DEVICEHIGH=C:\WINDOWS\RAMDRIVE.SYS 1200 512 /E
where 1200 is the size and 512 is the sector size. Windows will attach the
next available free drive letter to it (e.g. 'R:'). If you want to load Perl
onto the RAM disk automatically, at boot time, add some commands to your
autoexec.bat:
md r:\perl
xcopy32 e:\perl\bin\perl*.* r:\perl
xcopy32 e:\perl\bin\cmd*.* r:\perl
PATH %PATH%;R:\PERL
set PERLLIB=E:\PERL\LIB
This assumes that you leave the Perl libraries on the hard disk (here, E:).
If you want a full-blown Perl on a RAM disk, you'll need about 6Mb of space.
Windows NT Questions
@echo off
mycgi.exe > temp.tmp
type temp.tmp
UNIX Questions
OS/2 Questions
Writing and debugging CGIs
#! perl
print "Hello World!";
setmode (fileno (stdout), O_BINARY);
In Perl, this should work:
open (BLOCK, '>'.$ENV {'CGI_STDOUT'});
binmode BLOCK;
print BLOCK $binbuffer;
close BLOCK;
[Server]
cgi-url=/cgi
[/cgi-bin]
webmask=..whatever...
<BASE href="http://my-domain/cgi-bin/">
<FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST>
File to process: <INPUT NAME="userfile1" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
You can test this quite simply by using ACTION="cgi-bin/testcgi.exe" and
enabling CGI debugging ([cgi]debug=1) to see what the stdin stream looks
like. To decode the file upload data you could use the functions in
sflhttp.c.
Multihosting/Virtual Hosting
FTP Questions
[pub]
guest=..flags..
and not [guest/pub], [/pub], [/guest/pub] or any other combination. The key
is that you have to look at the protected directory name from the point of
view of the logged-on user. The user's home directory is []; the pub
subdirectory is [pub].
Miscellaneous Questions
| << | <
| > | >>
| Welcome To Xitami
| Table Of Contents
| Installing Xitami
| Administration
| Configuration
| Using The Common Gateway Interface (CGI)
| Using SSI and Filters
| Image Maps
| Virtual Hosting
| The FTP service
| A Beginner's Guide
| Writing Web Server Extension (WSX) Agents
| Extending Xitami with External Peer Processes
| FAQ
| Technical Implementation
| Getting Support
| Release History
| License Agreement
Copyright © 1996-97 iMatix Corporation