<!--#include virtual="header.html" -->
<H1 ALIGN="CENTER">Apache Server Frequently Asked Questions</H1>
<P>
- $Revision: 1.4 $ ($Date: 1999/07/04 16:33:00 $)
+ $Revision: 1.5 $ ($Date: 2000/04/18 17:52:31 $)
</P>
<P>
The latest version of this FAQ is always available from the main
<LI><A HREF="#forbidden">Why do I get a
"<SAMP>Forbidden</SAMP>" message whenever I try to
access a particular directory?</A>
+ <LI><A HREF="#ie-ignores-mime">Why do my files appear correctly in
+ Internet Explorer, but show up as source or trigger a save
+ window with Netscape?</A>
</OL>
</LI>
<!--#endif -->
directives so Apache can be sure to tell them apart correctly.
</P>
<P>
- Please see the
- <A HREF="http://www.apache.org/docs/vhosts/">Apache
+ Please see the <A HREF="../vhosts/">Apache
Virtual Host documentation</A> for further details about configuration.
</P>
<HR>
web server in order for the content to be accessible.
</P>
<HR>
+ </LI>
+ <LI><A NAME="ie-ignores-mime">
+ <STRONG>Why do my files appear correctly in Internet
+ Explorer, but show up as source or trigger a save window
+ with Netscape?</STRONG></A>
+ <P>
+ Internet Explorer is ignoring the mime-type you have configured for
+ the file and guessing the file type based on the filename
+ extension. IE does this for any file which the web server marks as
+ application/octet-stream or text/plain. Netscape, on the other
+ hand, properly follows the directions of the web server and treats
+ the file as text/plain (displays it in the browser window as-is) or
+ application/octet-stream (pops up a download window).
+ </P>
+ <P>
+ In order to make all browsers work correctly, you should assure
+ that Apache sends the correct mime type for the file. This is
+ accomplished by editing the <CODE>mime.types</CODE> file or using
+ an <A HREF="../mod/mod_mime.html#addtype"><CODE>AddType</CODE></A>
+ directive in the Apache configuration files.
+ </P>
+ <HR>
</LI>
</OL>
<!--#endif -->
<!--#include virtual="header.html" -->
<H1 ALIGN="CENTER">Apache Server Frequently Asked Questions</H1>
<P>
- $Revision: 1.2 $ ($Date: 1999/07/03 22:12:50 $)
+ $Revision: 1.3 $ ($Date: 2000/04/18 17:52:31 $)
</P>
<P>
The latest version of this FAQ is always available from the main
<LI><A HREF="#remote-user-var">Why is the environment variable
<SAMP>REMOTE_USER</SAMP> not set?</A>
</LI>
+ <LI><A HREF="#user-cgi">How do I allow each of my user directories
+ to have a cgi-bin directory?</A>
+ </LI>
</OL>
</LI>
<!--#endif -->
</P>
<HR>
</LI>
+ <LI><A NAME="user-cgi"><STRONG>How do I allow each of my user directories
+ to have a cgi-bin directory?</STRONG></A>
+ <P>
+ Remember that CGI execution does not need to be restricted only to
+ cgi-bin directories. You can <A HREF="#CGIoutsideScriptAlias">allow
+ cgi execution in arbitrary parts of your filesystem</A>.
+ </P>
+ <P>
+ There are many ways to give each user directory a cgi-bin directory
+ such that anything requested as
+ <SAMP>http://example.com/~user/cgi-bin/program</SAMP> will be
+ executed as a CGI program.
+ Two alternatives are:
+ <OL>
+ <LI>Place the cgi-bin directory next to the public_html directory:
+ <P>
+ <DL>
+ <DD><CODE>ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2</CODE>
+ </DD>
+ </DL>
+ </P>
+ </LI>
+ <LI>Place the cgi-bin directory underneath the public_html directory:
+ <P>
+ <DL>
+ <DD><CODE><Directory /home/*/public_html/cgi-bin><BR>
+ Options ExecCGI<BR>
+ SetHandler cgi-script<BR>
+ </Directory></CODE>
+ </DD>
+ </DL>
+ </P>
+ </LI>
+ </OL>
+ <HR>
+ </LI>
</OL>
<!--#endif -->
<!--#include virtual="header.html" -->
<H1 ALIGN="CENTER">Apache Server Frequently Asked Questions</H1>
<P>
- $Revision: 1.1 $ ($Date: 1999/06/24 15:02:52 $)
+ $Revision: 1.2 $ ($Date: 2000/04/18 17:52:31 $)
</P>
<P>
The latest version of this FAQ is always available from the main
<LI><A HREF="#passwdauth">Can I use my <SAMP>/etc/passwd</SAMP> file
for Web page authentication?</A>
</LI>
+ <LI><A HREF="#prompted-twice">Why does Apache ask for my password
+ twice before serving a file?
+ </LI>
</OL>
</LI>
<!--#endif -->
</P>
<HR>
</LI>
+ <LI><A NAME="prompted-twice"><STRONG>Why does Apache ask for my password
+ twice before serving a file?</STRONG>
+ <P>
+ If the hostname under which you are accessing the server is
+ different than the hostname specified in the
+ <A HREF="../mod/core.html#servername"<CODE>ServerName</CODE></A>
+ directive, then depending on the setting of the
+ <A HREF="../mod/core.html#usecanonicalname"><CODE>UseCanonicalName</CODE></A>
+ directive, Apache will redirect you to a new hostname when
+ constructing self-referential URLs. This happens, for example, in
+ the case where you request a directory without including the
+ trailing slash.
+ </P>
+ <P>
+ When this happens, Apache will ask for authentication once under the
+ original hostname, perform the redirect, and then ask again under the
+ new hostname. For security reasons, the browser must prompt again
+ for the password when the host name changes.
+ </P>
+ <P>
+ To eliminate this problem you should
+ <OL>
+ <LI>Always use the trailing slash when requesting directories;
+ <LI>Change the <CODE>ServerName</CODE> to match the name you are
+ using in the URL; and/or
+ <LI>Set <CODE>UseCanonicalName off</CODE>.
+ </OL>
+ </P>
+ <HR>
+ </LI>
+
</OL>
<!--#endif -->
<!--#if expr="$STANDALONE" -->
<!--#include virtual="header.html" -->
<H1 ALIGN="CENTER">Apache Server Frequently Asked Questions</H1>
<P>
- $Revision: 1.5 $ ($Date: 2000/02/11 22:11:33 $)
+ $Revision: 1.6 $ ($Date: 2000/04/18 17:52:32 $)
</P>
<P>
The latest version of this FAQ is always available from the main
</LI>
<LI><A HREF="#rotate">How can I rotate my log files?</A>
</LI>
+ <LI><A HREF="#conditional-logging">How do I keep certain requests from
+ appearing in my logs?</A>
+ </LI>
</OL>
</LI>
<!--#endif -->
</PRE></P>
<HR>
</LI>
+ <LI><A NAME="conditional-logging">
+ <STRONG>How do I keep certain requests from appearing
+ in my logs?</STRONG></A>
+ <P>
+ The maximum flexibility for removing unwanted information from
+ log files is obtained by post-processing the logs, or using
+ piped-logs to feed the logs through a program which does whatever
+ you want. However, Apache does offer the ability to prevent
+ requests from ever appearing in the log files. You can do this by
+ using the
+ <A HREF="../mod/mod_setenvif.html#SetEnvIf"><CODE>SetEnvIf</CODE></A>
+ directive to set an environment variable for certain requests and
+ then using the conditional
+ <A HREF="../mod/mod_log_config.html#customlog-conditional"><CODE>CustomLog</CODE></A>
+ syntax to prevent logging when the environment variable is set.
+ </P>
+ <HR>
+ </LI>
+
</OL>
<!--#endif -->
<!--#if expr="$STANDALONE" -->