| iMatix home page
| Xitami home page
| << | < | > | >>
Xitami Xitami
Version 2.4d7

 

FAQ

Installing and Configuring Xitami

Windows 3.x Questions

Windows 95/98 Questions

Windows NT Questions

UNIX Questions

OS/2 Questions

CGI and SSI questions

Multihosting/Virtual Hosting

FTP Questions

Log File Questions

Miscellaneous Questions


Installing and Configuring Xitami

1: When I try to use the /admin setup, Xitami asks for a password! 

Create two files:

  1. defaults.cfg:
    [Security]
        filename=defaults.aut
    
  2. defaults.aut:
    [/Admin]
        admin=verysecret
    
Now use userid 'admin' and password 'verysecret' to access the WBA.

[Top]


2: Help - I don't understand how to define users and passwords! 

Xitami uses two separate user/password systems, one for web pages and one for FTP access. To start with, create the defaults.cfg and defaults.aut file as described above. Then, for each webpage directory you want to protect, add an entry in defaults.aut. Enter the URL directory with or without a leading '/' - it does not matter. Add each user with their password. For instance, to say that only 'John' and 'Janet' can get at webpages starting with '/personal', you write something this:

[/personal]
    john=Go96xas883
    janet=Yhs7gsr73
(I'm inventing silly passwords here.)

For FTP access, you need to define each FTP user separately. First, add these lines to defaults.cfg:

[Ftp]
    Directory-file=ftpdloc.aut
    User-file=ftplocal.aut
Now you can edit ftplocal.aut to define users. The file ftpusers.aut shows what's allowed. For example, to define an 'anonymous' user, who connects to the ftproot/pub directory with read access only, write this in ftplocal.aut:
[Anonymous]
    Access=G
    Password=*
    Root=/pub

A fairly classic setup is to define a personal web space for each user which they can update using FTP. Be careful with this, since it's possible to set things up so that any user can run a CGI program (unsafe on Windows systems). However, this is how you do it:

  1. For each user, create a directory below the ftproot with the user's short name.
  2. Create an FTP account as described above. Use the access rights GPD, and MR if you want allow them to create/remove directories.
  3. Define an HTTP alias that points to this directory. For instance, in defaults.cfg:
    [Alias]
        john=ftproot/john
    
  4. If you also want these webpages to be private (password protected), add an entry to defaults.aut:
    [/John]
        john=Gsh65sgs12
    

[Top]


3: Can I refer to an environment variable in the webpages setting? 

Yes. For example, if you defined the variable WEBROOT to specify the webpages location, use $(WEBROOT) in the webpages setting. Note that environment variables are set in your startup script at the operating system level (e.g. .profile under Unix, autoexec.bat under Windows 95).  

[Top]


4: 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 WBA, you can delete defaults.cfg. See the previous question for defining a new admin user and password.

[Top]


5: 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.

[Top]


6: What is a 'HTTP port', actually? 

It is a TCP/IP port that is used for HTTP. (HTTP being the HyperText Transfer Protocol, the means by which web pages, etc, get transfered around (usually).)

[Top]


7: Why do web servers want to use port 80 by default? 

In order to contact a program running on another computer via TCP/IP (such as, say, a web server), you need to know two things: the IP address of the other computer, and the TCP/IP port on which it is listening for requests. The URL always includes the name of the other system (or its IP address), from which you can get the IP address that you need. The TCP/IP port canbe included in the URL, but usually isn't. So you need another way to find out the URL. Of the various ways that this could be done (ask someone/another computer, guess, etc), the one chosen for most TCP/IP services is "you just know what it is". That is, there is a "Well Known" port number for most TCP/IP services including HTTP, which "everyone knows", and if nothing else is specified then that is the one that is used. The "Well Known" port number for HTTP is 80. So the servers want to use it by default so that everyone will know where to find them by default.

[Top]


8: Is there some way to disable the WBA completely? 

Yes, set the security:admin option to 0.

[Top]


1: do I know that my personal config 'xxx.cfg' is being loaded? 

Edit the config file and add a line '! Loading xxx.cfg'. Now, enable server debugging, and when you start Xitami, this message is output to the debug.log file.

[Top]


9: 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.

[Top]


10: 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:

[Security]
    filename=defaults.aut
In principle you can now re-install Xitami safely. The installation will not overwrite anything else you modified, including log files, web pages, CGIs, etc. However, for safety, make a zip of the whole Xitami root before re-installing, just in case. You should do this regularly anyhow.

[Top]


11: 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:

[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.

[Top]


12: How do I change the HTTP port but leave the FTP port at 21? 

You can shift the HTTP port between 80 and 100 while leaving the FTP port at 21. Set the server portbase to a value between 1 and 20, and subtract this from the FTP port setting. So, to move the HTTP port to 90, set the portbase to 10, and the FTP port to 11.

[Top]


13: 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. For instance, if your TCP/IP configuration specifies a particular gateway or DHCP server that is not available (because you are not physically connected). Check that the host and domain info in the DNS tab of the TCP/IP properties in the network control panel matches the info in the identification tab of the network control panel.

One typical symptom 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.

[Top]


14: '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:

  1. The browser simply won't connect at all... you probably told Xitami to use a specific IP address, which excludes accesses via 127.0.0.1. Solution: delete any line 'ipaddress=xxx' in defaults.cfg.
  2. If you're using a proxy server, first try to disable this completely. If this improves things, now reconfigure the proxy settings so that the local addresses (127.0.0.1 and localhost) get past. If this still fails, you may need to define an entry in your 'hosts' file for 'localhost'.
  3. Your server may be behind a proxy server that is not allowing HTTP connections to get past. See your network administrator.

[Top]


15: 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:

  1. You may have an old version of Xitami. Make sure you're running at least version 2.0.
  2. You may have installed a new version of Xitami but kept the xitami.cfg from an old installation. This can leave the WSX definition for /admin undefined, so /admin will not work. Symptom: you get 'not supported' as an error message.
  3. If you're using Xitami under Windows 3.x, the /admin WBA is not supported. The 32-bit 'console' version of Xitami can run under Win32s.

[Top]


16: 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'.

[Top]


17: Why does my server address switch between 127.0.0.1 and 253.239.42.1? 

127.0.0.1 is always available (it's the local loopback address); the other address is available when you're online and connected to the outside world.

[Top]


18: I want to test a site but my browser can't find 'www.myhost.com' 

Edit the 'hosts' file (in the Windows directory, and you may want to rename 'hosts.sam' to 'hosts'), and point the your site name to 127.0.0.1.

[Top]


19: 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.

[Top]


20: 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.

[Top]


21: 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.

[Top]


22: Can I run Xitami under DOS? 

Which version of DOS? We've not tested Xitami on a pure-DOS system, but it does run in the DOS box of Windows 95. If you're looking for something that will run on a PC without Windows, you could consider OS/2 or Linux: both run Xitami very well and with minimum hardware.

[Top]


23: 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.

[Top]


24: 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.

[Top]


25: 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'.

[Top]


26: 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.)

[Top]


27: How do I move my web site to an Internet domain name? 

See the Beginner's Guide section. 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.

[Top]


28: 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.

[Top]


29: 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.

[Top]


30: 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.

[Top]


31: My images don't load, and various links give 'Not found' 

You can switch off image loading in the browser, but I doubt this is the problem. More likely, you're using references that are incorrect for the configuration you're using. Look at the HTML pages, and check the <A HREF> tags. These must be valid. For example if they refer to some hostname which is not accessible, the images won't load.

[Top]


32: Why do my aliases not work? 

Set server:debug to 1 and see what's going on in debug.log. The WBA pages provide a 'test' facility where you can type an URL, and Xitami tells you what disk file it would be translated to.

[Top]


33: How can I change the error 404 message in Xitami? 

Edit the file errors/text-404.

[Top]


34: What's 'Vanilla' Xitami? 

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.

[Top]


35: 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.

[Top]


36: After running a script that modifies defaults.aut, how do I get the same script to restart the server? 

You don't need to, since Xitami will automatically reload its config, including any modified password files, after a timeout that you can set as required (the server:refresh option).

[Top]


37: 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'.

[Top]


38: 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.

[CGI]
    debug=1

[Top]


39: 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.*,*

[Top]


40: 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).

[Top]


41: How do I make my server secure? 

Firstly, consider buying Xitami/Pro which includes support for SSL/2, SSL/3, and TLS.

Then, understand that there are several standard ways to compromise a system via a web server:

The main protection is to run Xitami on a system that has no basic security problems (i.e. Linux v.s NT), and to run it under a user id that has minimum privileges (so that even through a buffer-overflow attack, the hacker cannot do much damage). Disabling CGI is also a good idea. FTP does not pose much risk either way, if you disallow uploading, which allows a DoS attack (fill-up the hard disk).

Here is Brian Westric's checklist for securing Xitami under Windows NT:

  1. Under Unix, set port to 8085 to allow use of guest account (note: this doesn't work from web admin, one must edit the config file and restart the server).
  2. Start webserver as a service that uses a guest account. This account will have read access to the webpage directories, and no access to other directories.
  3. Make sure cgi-bin directory is empty.
  4. Disable directory browsing (in both cgi, and security sections).
  5. Delete default user in default.aut.
  6. Change admin password (by editing default.aut), and specify a su password (in security tab).
  7. Ftp: put port (offset) at -7984 so it runs at port 21 (otherwise, it doesn't seem to work correctly, possibly an issue with my firewall).
  8. Ftp: rename greeting, goodbye, userpermission, and dirpermission files.
  9. Ftp: only have an anonymous user, and give them download permission in one dir, upload in another.
  10. Ftp: specify log directory for a different directory than main directory.

[Top]


42: 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:

[Aliases]
    joe=ftproot/joe
Which points all URLs starting with '/joe' into this directory.

[Top]


43: Does Xitami support http://ipaddress/~username? 

The ~username syntax is a UNIX thing; the UNIX shell translates ~username into the home directory for a user. Xitami does not yet support this automatically. However you can get much the same effect by creating a subdirectory for each user underneath the webpages directory, called '~username'.

[Top]


44: 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.

[Top]


45: 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.

[Top]


46: No-one can connect to my server through the firewall! 

In some networks, your server may not even be addressable from beyond the firewall. In this case you cannot do much. In other cases, the server is addressable, but the firewall may be blocking some combination of ports and protocols and addresses. If this is the case you may be able to convince the network administrators to open-up access to your server on port 80.

[Top]


47: Why does the Restart function not work? 

Some functions are not affected by the Restart function. You cannot modify the HTTP port 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.

[Top]


48: The browser is not showing my new pages 

There are various reasons why a browser will cache out-of-date pages. These are the most common ones:

[Top]


49: 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.

[Top]


50: 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.

[Top]


51: 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.

[Top]


52: How does Xitami work with subdomains? 

Let's say you have a domain, like imatix.com, with a fixed IP address (207.92.100.8 or something like that). The domain-name servers provided by our web site providers (azc.com), handle the translation from imatix.com to a numeric address. For fun, we defined www.imatix.com and ftp.imatix.com to point to the same address, i.e. the same network card on the same system. It'd be quite possible to define further subdomains, all ending in imatix.com, and all pointing to the same system. We call these 'virtual hosts' since each apparently distinct system, or host, actually comes back to the same thing. Xitami lets you define a specific profile for each virtual host, which you can create using the WBA virtual host wizard. All this works under the same single registered domain.

[Top]


53: 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.


Windows 3.x Questions

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.

[Top]


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. Alternatively, install the 16-bit MSIE, which comes with a TCP/IP stack that should work with Xitami.

[Top]


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.

[Top]


4: When will FTP work in the Win 3.x version? 

This will never work, due to memory limitations. We've had reasonably good results running the 32-bit console version on top of Win32s, and we recommend you try this if you really need the FTP and other features (such as WBA and LRWP) which are missing from the 16-bit version.

[Top]


5: 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.


Windows 95/98 Questions

1: 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). Windows 95/98 leak memory when the TCP/IP stack is heavily used. If you want to run a web server on a small cheap system, use Linux.

[Top]


2: Can I use ASP (Active Server Pages) with Xitami? 

If you have Visual Basic 5.0, you can convert your ASP pages with the VB conversion module provided in the server pack. You will need to make some modifications to the ASP code. You can then compile it as an executable program, and run it as a normal CGI program.

[Top]


3: 'Could not open HTTP port 80 - Protocol not known' 

Your TCP/IP protocol is not correctly installed. Try these steps:

[Top]


4: '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. You can also run Xitami on another port by changing the server:portbase option, e.g.:

[Server]
    portbase=1000
To run the HTTP service on port 1080 and the FTP service on port 1021.

[Top]


5: 'How do I run PWS and Xitami on the same system?' 

Using regedit, edit your registry:

HKEY_LOCAL_MACHINE/
System/
CurrentControlSet/
Control/
ServiceProvider/
ServiceType/
W3SVC/
TcpPort will be set at 50 (hex), value must be changed to 901f (hex) for port 8080. Reboot your system. If you're running FrontPage, FP Ext's must be uninstalled and reinstalled again.

[Top]


6: 'Your browser sent a malformed request' 

Check you're not using a Wingate proxy server or something similar on Xitami's port. If you are, switch Wingate to port 90.

[Top]


7: How can I tell what TCP/IP ports are assigned? 

You can find out which TCP/IP ports are being used with:

netstat -a
or "netstat -na" if you don't have good DNS access. But this won't tell you what programs are using them. Under some Unixes you can use something like lsof (list open files) to find out the program using them; but I'm not aware of any equivalent for Windows 95. With Xitami stopped, try running the netstat command and look for a line with ":80" in it (or ":http") in the local address part; which indicates that something is using port 80. If there is, you'll have to dig around and see if you can find what it is.

[Top]


8: My URLs starting with file:// don't work across the network 

When you use a URL starting with file://, this is not handled by Xitami at all, but by the browser which picks-up the file from the local system. Xitami can handle URLs starting with http: and ftp:.

[Top]


9: Tips for using Xitami with dynamic IP addresses 

From Alex Feinerg a.k.a Yoonicks@EFNet and others...

[Top]


10: Tips for using a dial-up IP connection 

[Top]


11: 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.

[Top]


12: 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.

[Top]


13: 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. Its default reaction prior to release 2.3c was to wait and try again, it blinks between 'Running' and 'Suspended'. You can edit the defaults.cfg file to include these lines:

[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.

[Top]


14: I get 'Not authorized to access this resource' on aliases 

For security, Xitami does not allow access through short filenames when a long filename is defined. Without this check, it's possible to bypass user/password authentication by using the shortened name for a long name, or vice-versa. When you get this error, the xitami.log file will say '- request refers to an illegal filename'. 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 (not authorized). Use the full long filenames in alias or webpages definitions, or if the security issue does not bother you, set the security:safepaths option to 0.

[Top]


15: I get 'Not authorized to access this resource' on other URLs 

There are a number of specific reasons why Xitami may return this:

  1. The resource you are accessing is protected by a 'webmask' definition which excludes your PC.
  2. You are trying to browse a directory, but directory listings have not been enabled.
  3. You are trying to use an HTTP update method (PUT, DELETE, MOVE, or COPY) on a resource which has not been authorised for this.
  4. You are trying to run the WBA, but this has been disabled by the security:admin option.
  5. The URL refers to a Windows short filename when a long filename also exists. Xitami rejects this as being a potential security violation. You can switch this behaviour off by setting security:safepaths to 0.
  6. You're trying to do a HTTP PUT, DELETE, MOVE, or COPY operation, and specified an absolute Content-Location: or Destination: URI which did not have the same path as the request URI. Xitami rejects this because the authorisation was carried-out on the request URL, and using a different path for the Content-Location: or Destination: URL would violate this.
  7. A HTTP PUT, DELETE, MOVE, or COPY operation failed because of an access violation at the operating system level - for instance Xitami tried to write to a file which was marked as read-only.

In most of these cases, the reason for the error will be logged when you enable server debugging.

[Top]


16: 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.

[Top]


17: My web server address is 'http://default/' - why? 

Check the TCP/IP configuration; your system is probably called 'default'.

[Top]


18: Can I run RealServer on the same system as Xitami? 

Yes, but change RealServer's port from 80 to something else (e.g. 1024).

[Top]


19: 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.

[Top]


20: 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. We're not in the business of reverse-engineering Microsoft software.

[Top]


21: 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. See the question below on miscellaneous Win95 crashes.

[Top]


22: 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.

[Top]


23: Win95 gives me an error 10055 - Out of buffer space 

This can happen when you load the TCP/IP system heavily by running lots of servers. There is no cure except to switch to WinNT, OS/2, or Linux.

[Top]


24: Win95 still gives me errors when I use Xitami 

Apply the various Windows 95 'service packs' and updates. This is our list as of August 1998:

[Top]


25: Xitami crashes as soon as I try to start it 

Check your clock; Xitami is known to crash if the clock is set to later than the year 2038.

[Top]


26: 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).

[Top]


27: 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.

[Top]


28: When I run a CGI, I get a blank screen for several seconds 

Check that you've not configured your MS-DOS command window to appear full-screen. When the Xitami web server launches the CGI program, it does so in a way that says don't create a console window for the application. However, if the command window agent is configured for full screen, it switches first to full screen before making the test for putting up a console window which causes the blank screen to appear (sometimes with a blinking cursor). There doesn't appear to be a way of preventing this behaviour programmatically.

  1. Open the Start menu and choose Settings, Taskbar... and Start Menu Programs. Click on the Advanced button and find the 'MS-DOS Prompt' object in the Programs folder.
  2. Right mouse button click on the 'MS-DOS Prompt' object and choose the Properties option.
  3. Select the 'Screen' tab and set the usage to 'Window', not 'Full Screen'.

[Top]


29: 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.

[Top]


30: 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.

[Top]


31: 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.

[Top]


32: 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.

[Top]


33: 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.

[Top]


34: Why is Windows ignoring my changes to the hosts.sam file? 

This file must be called "hosts", without an extension.

[Top]


35: What's CGI/Win? 

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.

[Top]


36: Do you know of a good free proxy server for Windows?  Louis C. Lupin says: VSocks is a freeware Socks 4 proxy. It's easy to set-up and use. See http://www.pscs.co.uk/software/support/vsockslight.html.

[Top]


37: 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 says: Try the freeware version of SLMail .. it supports upto 6 users, and an autoresponder. It's a commercial-grade e-mail server for Win95/NT. If you want more than the 6 users available in the freeware version, you'll have to get the standard edition for win95 (SLMail v2.6), which runs for about $200 (go with the freeware). It is available from Seattle Labs at www.seattlelab.com. Hope you find it useful (I know I do :).

Ian Hayes says: For Win95/NT you can get a nice little SMTP server called JSMail at http://j-bg.demon.co.uk It does SMTP, POP3, finger, autoresponders and you can reject mail based on Received: lines, source or subject words. Reverse DNS, anti-relay, and RBL support (for those interested). Of course, you'll still need a domain, and when mailing to certian domains, an MX record. Monolith provides both for free. You can run it as a service or from the command line. Takes up very little resources.

[Top]


38: Do you know of a mail client for Windows? 

A free mail client for Windows is available from from the iMatix website.

David Lau also 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

[Top]


39: Any hints for boosting Xitami's performance? 

[Top]


40: 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.

[Top]


41: I installed MSIE 5 and uninstalled it, and now Xitami crashes whenever I try to start it up. 

Yes, indeed. Well, what do you expect when you install and then remove half of your operating system? Probably the only cure is to format the hard drive, and install a clean copy of Windows 95 or 98. Maybe reinstalling MSIE 5 will help.

[Top]


42: I'd like to run an abitrary Windows program from a browser 

Okay, but be warned that this opens your system to arbitrary abuse. You cannot launch a Windows program directly, since a CGI program runs as a hidden console (DOS) process. However, it's trivial via a small batch file, which itself starts the Windows program. For instance, here's a batch file that starts any program at all using the CGI argument, e.g. "/cgi-bin/run?notepad", where run.bat contains just 3 characters: "@%1".

[Top]


43: Can I stop Xitami from the command line or a batch script? 

You can use the wmkill.exe program supplied with Xitami. Wmps.c and wmkill.exe were written by Thomas Grobicki of Avilar Technologies to perform the functions of the Unix ps and kill commands for Windows 95/98 and NT. To kill Xitami, use this command:

wmkill -exact -titles -icons "Xitami Web Server"
To see the syntax for wmkill or wmps, type 'wmkill -help' or 'wmps -help'.

Windows NT Questions

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:

@echo off
mycgi.exe > temp.tmp
type temp.tmp

[Top]


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.

[Top]


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.  

[Top]


4: The Xitami service still fails to start! 

Search for the string "xiwinnt.exe", which may appear as follows:

KEY         VALUE
ImagePath   c:\program files\xitami\xiwinnt.exe
The space in 'program files' is what's bothering NT. Change the key data to this:
KEY         VALUE
ImagePath   "c:\program files\xitami\xiwinnt.exe"

[Top]


5: Can I restart the Xitami service from a batch file? 

net stop xitami
net start xitami

[Top]


6: 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...)

[Top]


7: 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.

[Top]


8: When I try to install Xitami on NT 4 I get a dialog box that says "Corrupt installation detected" 

Could be that the install .exe has indeed been corrupted. Try downloading it again and trying again. If this fails you could be seeing a problem with the 16-bit subsystem in NT. Did you install any service packs? (I think SP2 or 3 fixed this problem...) In any case you can easily install from the .zip file; if you're using the service version, install it by copying the .cpl file to the Windows system directory, and run 'xiwinnt -i'.

[Top]


9: Can I use 'srvany' with Xitami? 

Yes, this is a good way to run the console version as a service. You can get srvany from the NT resource kit, or you can download it from MSDN (the Microsoft Developer Network web site). The following tips were provided by Ignacio "Iggie" Bustamante.

  1. Copy SRVANY.EXE and INSTSRV.EXE to your NT system directory and install it as a Windows NT service for Xitami, for example:
    instsrv Xitamiweb c:\winnt\System32\srvany.exe
    
    This will set the preliminary entries for a service named "Xitami" (choose your own name).
  2. Specify the application to start and its parameters:
  3. Under Settings-> Control Panel-> Services, select Startup for Xitami. Set Startup Type: "Automatic", set Log On As: Select "This Account", and enter the appropiate Username and Password for an Administrative account.
This should do it. Note that NT will report that the service was started successfully even if there was an error. Always test Xitami after changing its configuration by running it as a console program (with the service stopped). When the service has started, test the server and check its log files for possible errors.

UNIX Questions

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.

[Top]


2: I need to search /usr/src/linux/include/ at build time 

The Xitami build uses a script, 'c', that lets you specify additional compiler options by setting the CCDEFINES variable. So, to specify an additional include directory, use shell commands like this before starting xibuild:

# CCDEFINES="-I/usr/src/linux/include"
# export CCDEFINES
# ./xibuild

[Top]


3: 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'.

[Top]


4: Does Xitami support .htaccess with per-directory access control? 

No, Xitami uses its own .aut files for access control.

[Top]


5: How can I run Xitami and have it listen on port 80 under Unix? 

Under Unix, only processes that are running as root are able to listen for new connections to TCP/IP ports less than 1024, including the well known HTTP port 80. So for Xitami to listen for connections on port 80 it needs to be run as root. And of course there must not be another web server running that is already listening for connections to port 80. There are three ways that you could do this:

  1. Log in, or su, to root, and start up Xitami.
  2. Have Xitami started during the startup scripts when the machine boots.
  3. Make Xitami "setuid root".
Which is best? It depends. (In the real world the answer is always "it depends"; why do they never accept that in exams?) To make Xitami "setuid root" after compiling it:
% su
# chown root xitami
# chgrp www xitami
# chmod 4770 xitami
# exit
%
where "www" is a Unix group that contains the users that should be able to start Xitami. Then the users that can run Xitami will be able to start it running as root, just by running it. If you do decide to set Xitami "setuid root" beware that this is a potiental security risk, because it means that users without the root password can start the server running, and if they discover a bug in Xitami or a program run by Xitami they may be able to get root access to other things on the machine.

iMatix does not recommend setting Xitami "setuid root" except in situations where only people who can be trusted to run any program as root have access to log in to the machine, such as a personal Unix box. Even in this situation the use of a program like "sudo" should be investigated as a possible alternative. Please also take a look at the next question concerning security aspects.

[Top]


6: What are the security implications of running Xitami as root? 

From Xitami 2.4b onwards it has been possible to request Xitami to change to a different user id and group id from the one that it was started in, for most of the time it is running. To do this in the [Security] section of defaults.cfg put:

[Security]
    setuid=1
    setuid-user=www
    setuid-group=www
assuming you have a "www" user and a "www" group (this is a common setup for Web Servers, but not universal). The default for setuid-user is "nobody" and the default for setuid-group is "nogroup", but using "www" for user and group is better if you have them available (or can add them). The user and group privileges you choose will have to be sufficient to allow Xitami to write to all the log files it needs, and run the programs it needs (eg, cgi-bin programs).

When [Security] setuid=1 is used Xitami changes the effective user id and group id to the ones specified. However it also retains the privileges with which it was started (commonly in this situation root privileges), in order to be able to reopen the TCP/IP port it is listening on and so on.

Currently Xitami runs cgi-bin programs with the same privileges as it is running itself. This means that when [security] setuid=1 is used, cgi-bin programs will be started with the effective user and group set as configured in the [security] section, but still with the user id with which it was started saved away (typically the "root" user id).

If Xitami is started as root (or has been "setuid root" (see above)), and using [security] setuid=1 a malicious cgi-bin program could recover the saved root privileges and then do nasty things. It also means that if someone finds an exploitable bug in your cgi-bin program, they might be able to trick the program into recovering the root privileges and running a program as root. All of this means that, as always, you need to be especially careful about checking cgi-bin programs for security issues.

Work is under way adding the ability for Xitami to run cgi-bin programs with different privileges from the ones which it is running as, including permanently discarding any saved privileges, which will further reduce this risk. This enhanced version will also include the ability to run the cgi-bin program with a different "root directory" from the one that Xitami is using, for additional security.

[Top]


7: What's the best Linux operating system? RedHat, Debian, FreeBSD...? 

Ewen McNeill says: Firstly, FreeBSD isn't a Linux operating system; it's a BSD-derived operating system. I haven't used it myself, but a number of large sites do use it and seem to be quite happy with it (eg, cdrom.com). Earlier versions of Xitami compiled and run under FreeBSD, but I'm not sure if anyone has tried with recent versions -- it should either run or be pretty simple to fix so it'll run.

Of the rest (RedHat, Debian, OpenLinux) I wouldn't expect much difference between them in terms of ability to handle load, etc. (Same for Slackware, Suse, etc as well.) They're all based around the same Linux kernels, and that (along with the web server) are the main things that'll affect stability, speed, etc (given the same hardware).

The main reason for choosing between the difference Linux distributions is the packaging of software they give you. Both RedHat (which uses RPM) and Debian (which uses .deb packages) have flexible package managers which will let you automatically install pre-compiled software, and make sure that any other programs that are needed to use them get installed too. RedHat has more GUI administration tools, but I've heard that it's more fussy about you using them too (that is, editing files by hand doesn't work so wel). Debian mostly has command line admin tools, which is good if you're used to that sort of thing (I like it). OpenLinux, Suse, etc, I don't know that much about -- but Suse is apparently very popular in Europe, and LinuxJournal are offering a copy of it with new subscriptions at present (at least they were in July). (I've installed some Slackware systems in the past and having tried Debian wouldn't switch back. Slackware seems to handle the basic install okay, but it's not so good on helping you keep your system up to date; Debian is very good at helping you keep your system up to date.

Personally my systems are all Debian systems -- but I like the command line tools, and the (dpkg) package manager, and tend to install systems without X.

[Top]


8: Why does the documentation always use DOS-style slashes? 

All recent versions of Xitami treat \ and / as identical, so the distinction is purely for the benefit of the server administrator. (Actually there is one exception, which is the \\ used to identify a remote file system under Windows. This must be entered as \\, not //.) We generally aim the documentation at Windows users, since these make-up the large majority of our user base. We also expect that Unix users are able to make the mental translation from \ to /. Use / on Unix and either / or \ on Windows.


OS/2 Questions

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".

[Top]


2: Xitami reports 'too many open files' 

Add this environment variable definition 'SET EMXOPT=-h120' to your config.sys. However, note the following point.

[Top]


3: Xitami aborts when my site is very heavily used 

EMX appears to have a fixed limit of 40 open sockets; when you hit this, programs start to abort or freeze. It's very unusual to reach 40 open sockets, but it is possible. You can limit the number of HTTP and FTP connections for your server, remembering that each FTP connection uses two sockets (one control, one data). You should also allow 5 sockets for use by Xitami itself.


Application Programming Questions

1: How do I write CGIs? 

There must be hundreds of places to get a good answer to this question. Look at the example programs in the cgi-src directory.

[Top]


2: What's a good source for CGI programs? 

Try www.cgi-resources.com.

[Top]


3: When I run a CGI program, I don't get any response 

Run your CGI in a DOS box and check first that it actually runs without errors. Then, check that whether it prints a first line starting with 'HTTP/'. If it does this, it must also generate a correct 'Content-Length' header. This is vital if the server uses Keep-Alive connections, which is the default configuration. You can disable Keep-Alive, but this makes things work slower. The best solution is to not produce neither the 'HTTP/' first line, nor the 'Content-Length' line. These just cause problems.

[Top]


4: 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.

[Top]


5: Would you recommend CGI or WSX for a simple e-mail application? 

CGI is much simpler. There is lots of information about CGI on the Net.

[Top]


6: 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.

[Top]


7: 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).

[Top]


8: Can you give me a checklist for installing Perl for Windows? 

Okay, here goes:

  1. This applies to Windows NT, Windows 95, and Windows 98.
  2. Get Perl for Windows from activestate.com.
  3. Follow the installation instructions and install into a directory like C:\software\perl.
  4. Using the above example, make sure that the PATH setting in your autoexec.bat includes the directory C:\software\perl\bin.
  5. Also, make sure that the PERLLIB environment variable is set in your autoexec.bat to 'PERLLIB=.;C:\software\perl\lib'.
  6. Reboot, then go to the Xitami cgi-bin directory and try 'perl testperl.pl'. This should print 'Hello World'.
  7. Now make sure that the CGI scripts you want to run start with the magic line '#! perl', or '#! /usr/bin/perl' or '#! C:/Software/perl/bin/perl' or something else appropriate.

[Top]


9: Why does my Perl CGI not run? 

This is a check list that may help you.

  1. Did you install Perl? (Yes, some people do forget this.)
  2. Can you run the CGI script from the DOS command line using the syntax 'perl scriptname'?
  3. Can you run the standard http://127.0.0.1/cgi-bin/testcgi program?
  4. Can you run a simple script like this:
    #! perl
    print "Hello World!";
    
  5. Does your CGI script start with '#! perl'?
  6. If you're running a 16-bit Perl, make sure Xitami is not in a subdirectory with long filenames (E.g. C:\Program Files\Xitami) or the CGI won't work. Under NT, forget 16-bit Perls completely.
  7. Finally, set the cgi:debug and server:debug options to 1. This will leave you with a couple of files in the temp directory- tempxxxx.cgo and header.log - that contain the actual CGI output and the headers sent back to the browser.

[Top]


10: How can I find-out what directory a script is called from? 

Here's a handy Perl snippet. It will dump the values of all environment variables. Use it after you have output the usual http/html document headers.

print map("<pre>$_ = $ENV{$_}\n</pre>", sort keys %ENV);
You'll find the values quite instructional, and you may even find a variable that you can use to solve your problem.

[Top]


11: Can I restrict the commands that a Perl CGI uses? 

This question was posed to Gurusami Sarathy, and he most graciously offered the following reply:

"The answer should be simple: just don't use Windows 95 if you want security. I'd recommend some OS that understands users, permissions, etc. Try Linux (I won't recommend NT, because NT makes for a rather inefficient webserver). That said, you may be able to disallow operators of your choosing with the Safe module. But its usage is not for inexperienced users."

[Top]


12: Every time my SSI page uses #exec, Xitami scans the floppy drive! 

This can be caused by virus-checking programs. Disable floppy scans in the virus-checker setup and check that the A: drive is not in your path.

[Top]


13: 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.

[Top]


14: A require() or use() command in my Perl CGI script fails 

This is a problem caused by the working directory used by the Perl interpreter. First-off, make sure the CGI working directory is "-" (which means the script's current working directory). If this still does not work, you have to modify the CGI script to explicitly set the correct working directory. Issue the following command, once, near the beginning of the main Perl function and be any "require()" or "use()" commands:

chdir ("c:/Xitami/cgi-bin/my_perl_script_dir");

Use an absolute path, and substitute your own path, of course.

[Top]


15: I get "Can't locate ./lib/cgi-lib.pl in @INC at C:Program  Files\Xitami\cgi-bin\test\hello.cgi line 3."

You have probably a problem with the PERLLIB setting. It must include the directories where require'd files are found. Alternatively, you may be able to fix this by running the script in the correct directory (set the CGI workdir to "-"). To sort this problem out, make a CGI script that creates a small file, then look for the file (this tells you where the script is running). E.g.:

open (FILE, ">myhint");
print FILE "This is my working directory";
close (FILE);

[Top]


16: I get "Document contains no data" when running a Perl CGI 

This message generally means "the Perl script didn't compile", which in turn means there was a bug in your script. Two things that might help:

  1. If you're using CGI.pm (recommended for Perl CGI scripts) then try running it from the command line (CGI.pm will prompt for the script input, which is very handy).
  2. When you've run the CGI script, have a look in the Xitami cgi error log, which is cgierr.log by default. If your script fails to compile, then you'll get error messages here.
You can also try putting "warn" messages in your Perl script, eg:
warn "About to try ... \n";
and they'll appear in the CGI error log, so long as the script compiles and runs up to that line.

[Top]


17: How does Xitami handle its CGI stdio? 

Xitami creates temporary files called 'pipe' something, and connects these to the stdin and stdout streams for the CGI subprocess. If there is something crooked in the subprocess itself, these can get lost. For instance if it's a 16-bit program under NT. The CGI_STDIN and CGI_STDOUT environment variables are provided for languages like BASIC which really can't access the stdio. Then it's possible to switch-off Xitami's piping (set cgi:stdio to 0), and in the program, read and write the stdin and stdout files directly.

[Top]


18: Why does my Perl 'flush' command not work under Xitami? 

This command is a simple "$| = 1;" issued somewhere at the beginning of the script, and is supposed to send (flush) to the browser any and all output (print statements) as they are being issued. Because Xitami does not work with streaming output, for now. It buffers all CGI output until the CGI ends, then sends it to the browser. We're considering alternatives to this model to allow streaming output.

[Top]


19: 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.

[Top]


20: How do I add support for PHP3? 

To install PHP3 support, add an entry to the [Filter] section of the config files, e.g.

[Filter]
  .php=c:\php3\php3.exe

[Top]


21: 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.)

[Top]


22: 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.

[Top]


23: 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.

[Top]


24: 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):

setmode (fileno (stdout), O_BINARY);
In Perl, this should work:
open (BLOCK, '>'.$ENV {'CGI_STDOUT'});
binmode BLOCK;
print BLOCK $binbuffer;
close BLOCK;

[Top]


25: 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.

[Top]


26: I want to put some CGIs in another directory, e.g. /htdocs/myscripts 

Define a CGI alias.

[Top]


27: How do I use a CGI program as a default page? 

  1. Add the index.cgi file to the list of default pages.
  2. Make sure that index.cgi is 'executable'.
  3. Define the server:cgi-url as "/".
  4. Define the server:cgi-bin directory to be same as server:webpages.
  5. Define cgi:mixed-url to be 1.
  6. Define cgi:dirlist to be 1 if you want directory listings to be enabled.

[Top]


28: How do I set-up a web site counter? 

Use a web site counter like this one for Windows 95.

[Top]


29: 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.

[Top]


30: 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.

[Top]


31: 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:

[Server]
    cgi-url=/cgi

[Top]


32: My CGI '/somedir/cgi-bin/script' does not work 

If you use /cgi-bin in the URL below the top level, you must enable the cgi:wildcard option.

[Top]


33: 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.

[Top]


34: 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.

[Top]


35: I want to limit CGIs, but not HTML pages, to certain IP addresses 

Add this to the authentication file:

[/cgi-bin]
    webmask=..whatever...

[Top]


36: 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.

[Top]


37: How do I write a shopping-card CGI program? 

You should ask this kind of question on CGI or HTTP newsgroups, and research the Internet for answers. The simplest way to do this is to use cookies, or to use URL arguments (?xxxx) to know the 'state' for each user. If you want to maintain long-term state for users, it's best to force them to logon (and thus identify themselves) each time they come back to the site. See the question on CGI user authentication.

[Top]


38: How do I access ODBC databases under Windows? 

From Perl, you can use Win32::ODBC, ActivePerl for Win95, and the DCOM driver. One report: "It worked very well - I was able to duplicate in a matter of hours what my buddy took almost a week to do with MS software, and the result was faster and looks better!"

[Top]


39: 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.

[Top]


40: 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).

[Top]


41: 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:

  1. Use absolute references for the image files (starting with '/').
  2. Add a BASE tag at the start of the page (after the HEAD tag):
    <BASE href="http://my-domain/cgi-bin/">
    

[Top]


42: How do I do file uploads through CGI? 

Find the Internet document RFC1867. This is the kind of FORM code you need:

<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.

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.

[Top]


43: My SSI page says '#exec command not permitted for security reasons' 

To enable the #exec command, set the ssi:exec option.

[Top]


44: Can I use Java servlets with Xitami? 

Takyiu Liu says: I have used servlets with Xitami with an unconventional way. I use servletrunner (or Jrun if you prefer a 3rd party servlet engine) and point it to the servlet classes I have written (I have the servlet connected to a SQL Anywhere DB on request). I then use Xitami to serve the web pages, with form actions pointing at something like:

<FORM ACTION="http://53pc2951:8000/servlet/DBQuery" METHOD="POST">
On any platform where the servletrunner is not available, one can use the (undocumented) approach:
java sun.servlet.http.HttpServer -d your_servlet_directory
In other words, so long as a platform has a JDK 1.1 JVM, you can run servlets with just a copy of jsdk.jar.

Jrun is meant to be a servlet engine but in 2.2 they added primitive http support. By default, it comes up on port 8000 and a typical location to put the web pages is:

\Program Files\Live Software\JRun\2.2\jsm-default\services\jws\htdocs
I think it is modelled after Sun's Java Web Server. The default path for the servlet classes is:
\Program Files\Live Software\JRun\2.2\jsm-default\services\jse\servlets.
I also believe Jrun's http capability comes from ACME's server API, and so is very primitive compared with Xitami. It is great to be able to combine Xitami's http capability and Jrun (or servletrunner)'s servlet capability.

[Top]


45: Can I use LRWP peers with another web server? 

You can use the sneaky parallel-server approach suggested by Takyiu Liu for running servlets: run Xitami beside the other web server on another port, just for the benefit of LRWP.

[Top]


46: What plans do you have for server-side JavaScript? 

Xitami does not support server-size JavaScript and we do not have such plans.

[Top]


47: I've discovered a limit of 252 LRWP servers under Unix 

This is a problem with some Unix systems, caused by a limit on the number of open file handles. You can link Xitami with AT&T's "SFIO" library (available from http://www.research.att.com/sw/tools/sfio/ ). No source modification is required: just copy libstdio.a and libsfio.a from the SFIO distribution to ./src/smt/ and modify one line in "./src/smt/c" script from:

LIBLIST="$LIBLIST $CCLIBS"
to
LIBLIST="$LIBLIST $CCLIBS libstdio.a libsfio.a"
 

[Top]


48: How do I do user authentication in a CGI script? 

When a browser requests a page which Xitami considers 'protected', i.e. which is defined in defaults.aut, it fills-in a request header like like this:

Authorization: Basic dXNlcm5hbWU6MTIzNDU2Nzg=

The strange thing at the end is the sequence "username:password" encoded using base-64, as defined in the Basic Authentication Scheme in RFC2068. Xitami provides the encoded string in the HTTP_AUTHORIZATION environment variable. You can decode this using a fairly simple function - see the SFL sflmime module for an example in C.

It's also possible to tell the browser to ask for a password, if none is supplied, by generating a WWW-authenticate header. For example:

  if not VariableSet( HTTP_AUTHORIZATION )
    {
     HeaderLine( 'HTTP/1.0 401 Unauthorized' );
     HeaderLine( 'WWW-authenticate: basic realm="UserArea"' );
     echo 'Text to send if user hits Cancel button';
     exit;
    }
  else
     HeaderLine( 'Location: http://anHost/users/userCode/userPage.html' );
An entry like the following should exist in the defaults.aut file:
[/users]
  realm="UserArea"
  UserName1="UserPassword1"
  UserName2="UserPassword2"
  ...

Multihosting/Virtual Hosting

1: 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 WBA virtual host wizard to define new virtual hosts.

[Top]


2: 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.

[Top]


3: 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.

[Top]


4: 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\".

[Top]


5: Can I run two versions of Xitami, e.g. on ports 80 and 1010? 

It should work okay, providing you stop the two Xitami's from stepping on each others toes (eg, different home directories). If you want to run on port 1010 you'll have to give Xitami a carefully calculated base value (base (1010-80)=930; 1080 would be easier (base 1000).

[Top]


6: My virtual host setup does not work - what can I try? 


FTP Questions

1: People can't transfer files or see directories on my FTP server 

This is a typical problem caused by the way FTP works. If there is a firewall (some some kinds of router are the same) which does not allow connections from the server to the client, file transfers (including directory listings) will fail. You should tell your users to use 'passive' connections.

[Top]


2: 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.

[Top]


3: When exactly 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).

[Top]


4: 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.

[Top]


5: 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:

[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].

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. Make sure you read the comments in ftpdirs.aut to see how FTP authentication works.

[Top]


6: How do I create an alias under the /pub directory? 

This is not possible at present.

[Top]


7: Helloftp.txt does not show up under web-based FTP access 

This depends entirely on your browser: some show it, some don't.

[Top]


8: FTP aliases don't show-up when I do a browser directory listing 

Aliases don't show-up in HTTP directory listings. They do show up in FTP listings. This is just the way things work.

[Top]


9: How do I set-up FTP virtual hosts? 

Xitami does not yet support this, and when it does, it will only allow IP-based (as opposed to DNS-based) virtual hosting due to the way the FTP protocol works. A simple workaround is to run multiple copies of Xitami, one for each IP address, and each in its own home directory. Make sure to set the LRWP port to different values for each server, and set the FTP ipaddress and force-ip appropriately. Use the console version of Xitami to debug it, since this displays any error messages nicely. The Windows GUI versions don't, and you may just find yourself staring at a non-starting web server without knowing what's going on.

[Top]


10: Can I remotely browse my hard drives using Xitami? 

You can define an FTP alias to C:\, for instance, and manage this using a remote FTP client. Make sure you use a secure user id and password.


Log File Questions

1: 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.

[Top]


2: Does the FTP server log logins, uploads, and downloads? 

The FTP server logs uploads and downloads in the Xitami access log file, by default. To separate the FTP access log into a separate file, change the Ftplog:filename configuration option. This also applies to the error log, specified by ftperrlog:filename.

[Top]


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 a fast log file translation.

[Top]


4: Can I use Microsoft's WINS protocol for analysing my log files? 

Yes. This is extracted from Microsoft's documentation: "In Windows NT 4.0, Microsoft's implementation of DNS is tightly integrated with WINS. This allows non-WINS clients to resolve NetBIOS names by querying a DNS server. Administrators can now remove any static entries for Microsoft-based clients in legacy DNS server zone files in favor of the dynamic WINS/DNS integration. For example, if a non-Microsoft-based client wants to get to a Web page on an HTTP server that is DHCP/WINS enabled, the client can query the DNS server, the DNS server can query WINS and the name can be resolved and returned to the client. Previous to the WINS integration, there was no way to reliably resolve the name because of the dynamic IP addressing. Please see the 'DNS and Microsoft Windows NT 4.0' white paper for details on the WINS/DNS integration." The upshot of this is that xixlat will work with WINS if you have a WinNT 4.0 DNS server.

[Top]


5: 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.

[Top]


6: 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:

[Top]


7: 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.

[Top]


8: My log files do not get updated until Xitami is restarted 

This happens (on several operating systems) because the OS may not show changes to a file until the file is closed by the process writing to it. When you do a restart, Xitami closes its log files, and then you see all the entries. At a guess the log files are being block buffered, which means that they'll only be written out to the file once a block is full (probably somewhere between 2K and 8K at a guess). This is a function of the way that the runtime library handles file I/O.

[Top]


9: My computer crashed and now my log files are full of junk 

When the computer crashes, for whatever reason, it can leave open files in an incomplete state. One symptom is that allocated blocks can contain garbage from previous files, allocated to the new file, but not yet written with data. This is probably what happened to your log file. In other words, the junk is probably not what caused the crash, just random data that happened to be on the hard disk when Xitami was writing to its log file.


Miscellaneous Questions

1: How do you pronounce Xitami? 

Just say 'iMatix' backwards -- it's simple! Okay, to be more precise... There are two basic ways to pronounce this name; you can aspirate the 'X' as 'Sh', or you can keep it hard, as 'Ks'. In either case the accent is on the second syllable.

[Top]


2: What are the main problems with Xitami today? 

People also often ask for FrontPage support. Besides the fact that FrontPage uses an undocumented server interface, 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.

3: Can you recommend a search engine for Xitami? 

We've tried a few; there is a free engine available from www.excite.com, and we've also tested the free Swish engine, which works well with Xitami. You can get Wim Niemans' port of this for Windows 95/98/NT from the iMatix website.

[Top]


4: Why is the Xitami mailing list not a newsgroup? 

We are well aware of the advantages and disadvantages of newsgroups vs. mailing lists. Each has their strong points, but in general a mailing list is accessible to more people than a newsgroup. We're looking for ways to provide transparent merging of the two techniques, so that people can use the mailing list either as a newsgroup or a list. Until that date, we will stick with a mailing list.

[Top]


5: 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'. To ask all robots to skip your site, use this:

# robots.txt
User-Agent: *
Disallow: /

[Top]


6: Can I customise the directory listings? 

No, not in this version.

[Top]


7: Why is the password file not encrypted? 

In general if access to your server is secure, then the lack of encryption is not a problem. If someone can read the Xitami directory on your system, they can see the passwords. Note that even if you use a hashed password file, it is often trivial to discover passwords using a dictionary-based attack. It's therefore much better to concentrate on hiding the password file than on encrypting it. At some future date, Xitami will support encrypted (hashed) passwords.

[Top]


8: Do I need a special license to use/sell/modify Xitami at work? 

No, none. Read the Xitami license.

[Top]


9: I want to write a great Xitami addon... 

Excellent news! Xitami is an Open Source project, and has benefitted from many contributions, including people who ported the SFL library, wrote plugs like the LRWP agent, wrote documentation, tested it, and so on. You will want to learn how to use our great tools - Libero, SFL, SMT.

[Top]


10: How do I rebuild the SFL under Windows using MSVC? 

The simplest check-list is:

  1. Get the Xitami Windows source code distribution (this always contains the most recent release of SFL).
  2. Unzip into a directory; the SFL source code is put into src\sfl.
  3. Create a new project, for a static library; change the options to create an output file in the main directory (instead of debug/). I usually call the library 'libsfl.lib'.
  4. Add all source files called 'sfl*.c' from the src/sfl directory.
  5. Build.
For SMT, you can do the same, but there are some sources you want to leave out: smttst*.c and smtschm.c.

[Top]


11: I'm building a Windows app based on Xitami, but it aborts 

If you try to mix Xitami with MFC, you'll get a server that stops running after 60 seconds, or whatever you set the server:refresh interval to. This is because MFC traps the timer signal Xitami uses, and handles it as an abort. There may be workarounds for this, depending on how well you know MFC.

[Top]


12: How do I rebuild Xitami under Windows using lcc-win32? 

If you want to compile under Windows, you should download the Windows source kit, not the Unix one - this will give you files with the correct line endings (CRLF not LF). Then, you should set the environment variable CCNAME to lcc and CCDIR to the lcc-win32 directory. Try the c.bat file on one source, e.g. sflbits to make sure it works correctly, then run build.bat in src/sfl. Copy sfl.h and libsfl.lib to src/smt, and run build.bat there too. Lastly, when Xitami is built, be prepared to throw it away, since at the time of writing, lcc-win32 had a bug which causes Xitami to halt when it gets a timer signal -- see the following question.

[Top]


13: I compiled Xitami with lcc-win32 but it always aborts 

Lcc is a wonderful little compiler but its runtime has a problem with certain interrupts. Basically, when Xitami receives a timer signal, it aborts. This hits after the refresh timeout, and when running CGIs. We have notified the author of lcc, and provided a small test program that shows this behaviour. It's quite clearly a bug in lcc. Apart from this problem, we've found lcc to be fast, reliable, and in fact it's supported fully by the SFL. I can recommend it for CGI programming (oh, one more caveat - no support for ODBC as far as I could see).

[Top]


14: Why does iMatix.com use Apache, not Xitami? 

iMatix.com is hosted by Ascentrix Technologies, Inc. an excellent web hosting company (previously called AZC). They use a customised version of Apache with electronic commerce facilities.

[Top]


15: 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.

[Top]


16: Why is Xitami free, and will it remain this way? 

Xitami is a product that we developed to demonstrate the quality of our technology and to introduce people to iMatix Corporation. This web server will remain free software, and as the kernel for our commercial web server products, will continue to be ported, improved, and maintained.

[Top]


17: 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.

[Top]


18: Do you have any plans to incorporate SSL into Xitami? 

Xitami/Pro supports this. E-mail us for details and prices.

[Top]


19: What is the future for Xitami? 

Xitami will continue to be improved and extended, while keeping it a server that you can install and set-up within minutes. For professional users, Xitami/Pro offers more sophisticated functions but these also take more time to learn and configure. Xitami will remain free software.

[Top]


20: Is Xitami year 2000 compatible? 

Yes.

Go back to FAQ index


| << | < | > | >>
| Welcome To Xitami | Table Of Contents | Installing Xitami | Administration | Configuration | Using The Common Gateway Interface (CGI) | Using SSI and Filters | Image Maps | Virtual Hosts | 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
iMatix
Copyright © 1996-99 iMatix Corporation