KF Web Server Frequently Asked Questions
Common Problems
A 304 error sometimes get displayed in the browser
Getting more information on what is going wrong
The server returns a "Not Found" error with certain types of file
One of my web sites says "Not Listening" in the Status menu
I get an "Unauthorized" error when logging in to the administration page
Users cannot access my different web sites
I get a "Internal Server Error", 500 error when using a CGI request
I get a "Not Implemented", 501 error when using a CGI form
Files with special characters cannot be accessed
Some pictures are not displayed, when viewing a web page
Questions & Answers
Common Problems
A 304 error sometimes get displayed in the browser
When returning to a page viewed before a site a 304 error message is somestimes displayed in a FireFox browser.
This occurs when you site is using a custom error script.
The problem is caused by a bug in the script. To fix this problem add the following code to the very top of your custom error script:
<?kfl
$statuscode = envvar("HTTP_ERR_STATUSCODE");
if ($statuscode == 304)
{httperror(304);}
?>
Make sure that you do no add any space or new line code before or after the above text.
To download that latest example custom error script file that contains this fix
select this link: servererror.zip
Getting more information on what is going wrong
Some configuration problems are hard to identify. KF Web Server has the ability to provide
more detailed information on certain problems, which make identifing them a lot easier.
This is done by a feature called "Log Debug Info".
This feature is turned off by default as it slows down the system performance.
Go to the "Server -> Logging" menu and select the option "Log Debug Info" and press "OK" and the "Save and Restart" the server.
This option causes more detailed information on the failure to be written to the system log file (system.log, in your logs directory).
Before you look at the system log, attempt to access the problem request again to make sure the
information is written to the log file.
After the problem has been resolved turn this feature off again.
The server returns a "Not Found" error with certain types of file.
KF Web Server only returns files for the extensions for which it has been configured.
This is a security measure to prevent files such as your password data file being available to a user.
It is easy to add new extensions to the list which KF Web Server will serve.
Here is how to do it:
Go into the Administration page by right clicking the KFWS monitor and select administration.
Go to the MIME menu and you will see all the extensions that are configured.
Check to see if the file type is already listed, but does not have the extension you are using.
If this is the case then select the edit button next to the MIME type.
Change the "Extensions" field to add your extension and press OK. Then press "Save and Restart".
If none of the MIME types suit your file then you will have to add a new one and add the extension of your file.
One of my web sites says "Not Listening" in the status menu.
This message occurs if the server could not bind to the address and port you configured for the web site.
This could be either due to an invalid address or because another server on your machine is already listening on this port.
I get an "Unauthorized" error when logging in to the Administration page
KF Web Server gives you a few attempts at entering the right password before locking you out for one hour.
This is to prevent crackers try to use a dictionary attack on your server.
The first thing to try is to restart the server using the menu from the KF Web Server Monitor in your system tray.
This will clear the lock out and allow you to try again.
Make sure both the user name and password are the ones you recorded.
If this does not work then it is likely that the admin user name and password are different from the one you entered.
To solve this you will need to alter KF Web Server's configuration file by hand. Use notepad to edit the file
called kfws.conf, which you will find in the directory C:\Program Files\KeyFocus\KFWS\conf.
Search for the string "REALM Admin".
You should see a line like this just below <REALM Admin>
user admin cGFzc3dvcmQ=
This is the user name and encrypted password of the admin account.
Change it to:
user admin
and save the file. This will set the admin password to blank and enable you to log on.
You will need to restart the KF Web Server to make this take effect.
Once you have logged on go to the "Security" menu and then to the "Realms" sub menu.
Next press the "edit" button next to the Admin Realm.
Next press the "edit" button next to the admin user.
You can then enter a new password for the admin account.
Press "OK" and then "Save and Restart".
Users cannot access my different web sites
Setting up multiple web sites can be difficult and the error messages a user sees in their browser do not give many clues
to what is going wrong.
There are two main types of configuration errors that can stop multiple web sites from working.
The first are security configuration errors. If a web sites Document Root directory does not have the correct security settings then
a request will be rejected. This is the first thing to check. Go to the "Security -> Directories" menu and check the settings.
The second thing to check is the configuration of each web site. Read the following questions to find out more on how to configure multiple web sites.
- How do I set up multiple web sites?
- How do I set up multiple web sites so a user can access them all?
- How does the server select the web site a user should see?
If you still cannot resolve the problem then try the following:
Go to the "Server -> Logging" menu and select the option "Log Debug Info" and press "OK" and the "Save and Restart" the server.
This option will not fix the problem, but will make the server write extra information to the system log to help you resolve it.
Before you look at the system log, attempt to access the web sites causing the problem using a browser as you want a user to access your sites.
Go to the logs sub-directory and open the file system.log in Notepad.
Each successful request will look some thing like this:
[2002/06/15 12:11:30.093 6 +0000] Debug Connection {INFO} <Request: port: 9727, Host: 127.0.0.1, Local IP: 127.0.0.1. Matched web site: Admin>
The "port", "Host" and "Local IP" values are those that have been passed by the browser to the server.
The "Matched web site" value is the name of the web site that the server selected.
This may not be the web site you want and if this is the case then you will need to amend your configuration.
If the server could not find a match then you will have seen a Forbidden error and a entry something like this:
[2002/06/15 12:11:33.978 6 +0000] Debug Connection Error {INFO} <Request: port: 3001, Host: 127.0.0.1, Local IP: 127.0.0.1>
This means the server could not find a web site configuration that matches the values passed into the browser.
You will need to change your web site configuration so that a match can be made.
I get a "Internal Server Error", 500 error when using a CGI request
If the server encounters a problem executing a CGI filter then it will return the error message "Internal Server Error".
There are many reason why a CGI request could fail, it could be that the CGI Filter is not properly configured or the CGI
application itself has failed.
To track down the problem more information is required:
Go to the "Server -> Logging" menu and select the option "Log Debug Info" and press "OK" and the "Save and Restart" the server.
This option causes more detailed information on the failure to be written to the system log file.
Before you look at the system log, attempt to access the problem request again to make sure the
information is written to the log file.
I get a "Not Implemented", 501 error when using a CGI form
In KF Web Server it is possible to disable the ability of the user to POST data to the server for security reasons.
This will disable certain CGI applications.
To enable POST requests do the following:
In Administration go to the "Web sites" menu and edit the web site you are using for your CGI application.
Select the "Security" sub-menu.
In the field "Request Types:" make sure all three options GET,HEAD and POST are selected.
Press OK and "Save and Restart".
Files with special characters cannot be accessed
Hackers have found several vulnerabilities in web servers by the use of carefully encoded urls.
Although no such vulnerabilities have yet been found in KF Web Server we decided to tighten up the range of characters that are allowed
in directory and file names.
This safe set of characters will prevent potential exploits being found, such as the Unicode flaw in IIS.
The allowable characters are as follows:
- A..Z
- a..z
- 0..9
- space
- _
- -
- .
- Extended ASCII range 128..165
If any directory or file name contains any characters no in this set then the user will be prevented from requesting them.
If you cannot alter you file or directory names to conform to this character set then there is an option to turn off this secure checking.
Go to the "Security -> General" menu and select the "Less Secure File Names" option.
Some pictures are not displayed, when viewing a web page
If you have a web page that contains a large number of images, then a user may find that not all of the images are displayed.
For example this could be in a picture gallery containing a large number of thumb-nail images.
When a browser attempts to view such a page it may open a large number of connections to your server and exceed the
permitted maximum allowed.
If this occurs then you will need to change the configuration of your web site.
- In the Admistration screen go to the "Web Sites" menu
- Press the "Edit Web Site" button of the web site causing the problem.
- Select the "Security" sub-menu.
- Increase the value of the "Max Open Connections Per IP" setting. Try 25 or a higher number, depending on the number of images on the page.
- Press "OK" button
- Select the "Server" menu.
- You may also need to increase the "Max Clients" setting to 100 or over.
- Press the "Save and Resart" button
|