The Red Hat Linux Apache Centralized Knowledgebase

Red Hat Software, Inc.

This document is a collection of information gathered from far and wide using the best information resource known: the Internet. It's an analysis of the top 25 problem types reported regarding the Apache web server and the solutions to those problems whenever possible. It also contains installation FAQs on PostgreSQL and MySQL.


Table of Contents
1. Problems with Perl & CGI scripts.
How do I enable CGI or Perl script execution in directories other than the ScriptAlias?
What does it mean when my CGIs fail with "Premature end of script headers" or "Internal Server Error"?
I've just created a really cool Perl script. I FTP'd it to my site and I've got it in ScriptAlias but it won't run. What's wrong?
Why do I keep getting "Method Not Allowed" for form POST requests?
2. Problems with Server Side Includes (SSI).
SSIs don't work for VirtualHosts and/or user home directories. What's wrong?
What other ways are there to do includes?
How can I use ErrorDocument and SSI to simplify customized error messages?
3. Problems with basic configuration and config file issues.
I've been starting the httpsd daemon and port 443 just won't turn on. I don't have a certificate yet, but shouldn't I be able to get to the default splash page on port 443?
This server just won't run and I can't figure out why... what should I do first to try and troubleshoot the problem?
Why do I get "setgid: Invalid argument" at startup?
How do I tell what modules have been compiled into SWS?
How can I detect syntax errors in my config files?
How can I keep from having to use srm.conf and access.conf?
What's the best way to read and understand the config files for Apache?
4. Problems with file and directory path permissions.
I can't seem to get my users' pages up and working using ˜$username and public_html. What should I do?
I cannot get my CGI scripts to execute in my home directory. What should I do?
5. Problems with setting up virtual domains (virtual hosting).
I've set up a name based virtual domain but I can't get to it from the Web. It shows up fine when I look at it with lynx on the localhost or from my PC in the office, but when looked for on the Web I keep getting some sort of error about host not found. What's the problem?
I've set up an IP based virtual domain but I can't get it to work by name, only by IP address. Why?
What should an IP based VirtualHost directive look like?
What should a name based VirtualHost directive look like?
6. Problems with using htaccess.
How do I make htaccess work?
7. Problems with Secure Sockets Layer (SSL).
Basic HOWTO Info
Generating a Key
Generating a Certificate Request
Making a Test Certificate Yourself
Can I use my Stronghold Certificate with SWS?
Can I run multiple SSL-enabled vhosts with SWS?
How can I get httpd to startup without prompting for the password on the console after reboot?
Can we go get Apache-SSL 1.3.x and use that under the license we have from the Red Hat version?
I have several users complaining that they can't connect to our site with older browsers (Netscape 3x). I tried Netscape 3.0 and I get a message-box from Netscape saying "The security library has experienced a database error. You probably will not be able to connect to this site securely." What do I do now?
I am having a problem with some browsers not recognizing my certificate, but they aren't that old. Is there some place I can check for browser compatibility?
When I access my secure site, the wrong certificate is displayed.
I've been starting the httpsd daemon and it dies on start-up. Now I don't have a certificate yet, but shouldn't I be able to get to the default splash page on port 80?
Where can I find additional documentation on SSL?
SSL Documentation
I have multiple IP based domains and I need to enable more than one certificate. How do I do that?
I need to renew my Thawte cert. How do I do that?
How do I know which certificates match which key?
I get an error that looks like this: "no start line:pem_lib.c" or "no end line:pem_lib.c". What does it mean?
Internet Explorer Error: IE cannot open the Internet site www.foo.com. An error occurred in the secure channel support.
Netscape Navigator Error: "The server has encountered bad data from the client".
Large key sizes (larger than 1024 bits).
I purchased a Verisign cert. How do I install it?
Isn't there a mailing list with archives for Apache-SSL?
I am getting an error message in Netscape that says that "the certificate that the site 'my.domain.com/' has presented does not contain the correct site name. It is possible, though unlikely, that someone may be trying to intercept your communication with this site. If you suspect the certificate shown below does not belong to the site you are connecting with, please cancel the connection and notify the site administrator." What does this mean?
I've got everything up and working, at least the httpd daemon started with no errors. I don't have a graphical browser available to me so how do I confirm that the daemon is actually running on port 443?
I've tried everything I know and I just can't get SSL working. Any other thoughts on how to see if this is working and how to get a response from port 443 and the SSL?
8. Problems with installation and configuration of FrontPage extensions.
Is it easy to set up the Microsoft FrontPage extensions in SWS?
But I still need to have FrontPage extensions for my users, what should I do?
I have a problem with Apache and FrontPage extensions. I can open the root Web, but when I try to open a per-user Web I get an error. Example: http://host/˜user where user is public_html. Is this a problem with Apache?
Where can I get some instructions to help me install the FP extensions?
9. Problems with logfiles.
How do I add browsers and referrers to my logs?
What is Common Log Format?
Can I create multiple custom logs for my server?
Can I set up independent logs for my virtual hosted domains?
What configuration sequences are allowed for Apache log Directives?
How do I reset my SWS server's log files?
10. Problems with Perl (including mod_perl) permissions and configuration.
See Section 1 of this document.
11. Problems with PHP (including PHP/fi and PHP3).
How do I enable PHP?
How do I test PHP to make sure that it's working?
12. Problems with SQL (including MySQL, and postgreSQL).
How do I get MySQL support working in the PHP3 module which comes with SWS?
I didn't choose to install postgreSQL when I did my initial SWS install. How do I install it now?
I want to install MySQL. How do I do it?
Can I use Access databases instead of a full blown RDBMS with SWS?
13. Problems configuring the proxy functionality of Apache.
How do I enable proxy functionality in Apache?
How can I control who gets access to proxy services?
Why doesn't file type xxx download via FTP?
What better tools might there be to provide proxy services for my LAN?
14. Problems with configuring IP-aliasing with Apache.
How do I enable IP-aliasing for SWS?
15. Problems with tuning Apache.
What sort of things can I do to "tune" SWS?
How do I turn off reverse lookups? It's enabled and I think it's slowing my box down.
But what if I need hostnames for one of my CGI scripts?
16. Problems with Jserv.
I noticed Red Hat, Inc. is selling e-commerce bundle. Is this the only way to get the revised SWS which includes the Java Servlet support I'm looking for?
How do I get Apache Jserv up and working with SWS 3.0?
I've heard about JservSSI for Apache... where can I find out about it?
What version of Jserv is included with SWS?
Where can I get additional information on Jserv?
I keep getting the error "Premature end of script headers" with Jserv. What should I do?
I am getting an error that says something like "can't find the JServ class". What should I do?
Where can I find specific information on configuring Jserv?
17. Problems configuring redirection in Apache.
How do I redirect an entire server or directory to a single URL?
I know this isn't really re-direction but I've looked everywhere for good documentation on mod_rewrite and I can't find it... where is it?
18. Problems with configuration of bind (DNS) which affect Apache.
I've been struggling to get a virtual domain to work properly with DNS but I've been trying to use a CNAME for it. Will that work?
If I turn off HostNameLookups to reduce my server's load how can I get my logs to show the resolved names after the fact? Is there a tool that will do this?
My server keeps hanging on boot-up... and since you asked I am doing virtual hosting. What's the problem?
Here are some general tips to avoid DNS problems with Apache.
19. Problems with security.
How do I set up Apache to require a username and password to access certain documents?
I really don't understand the "satisfy" directive how does it work?
I have authentication rules setup but the server gives me an error. What is the problem??
20. Problems getting Apache to run suEXEC.
Can SWS be configured to run suEXEC?
21. Problems with ASP.
How do I configure Apache-ASP?
Is there a separate configuration file for Apache-ASP?
22. Problems with getting Web enabled e-mail running.
I've had a great deal of trouble getting IMP to run. Where is the documentation for Horde/IMP?
Are there any other web enabled e-mail packages I could try?
I have tried everything and have been reduced to banging my head on the keyboard, please tell me why IMAP functionality won't work with IMP?
But I have the IMAP RPM installed and it still doesn't work. What do I do now?
Where I get really detailed help with IMP?
23. Problems with robots.txt.
What is robots.txt used for?
How is it configured?
24. Problems with error codes.
How can I tell what these error messages mean?
25. Problems with advanced issues and recompiling.
Can I recompile SWS and still have SSL in it?
I have just updated my Red Hat Linux version and I tried to keep Apache from being installed so that it would not overwrite my configuration but I missed it. Now what do I do?
Is there any reference on compiling PHP3 with Secure Web Server as a DSO? Every time I try and compile stuff, it wants to build it into the server (which it can't do).
Is there a version of the binary compiled for something besides 386 that is faster?
I tried enabling PERLSTACKEDHANDLERS in the RPM build but persistent db connections still don't work. What's the story?
I have SWS 2.0 installed and I'm having a lot of trouble with Perl scripts. They just will not run. What should I do?
Is there some documentation that details how to build and add new modules like dbm_auth?