httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Httpd Wiki] Update of "FAQ" by jmcg
Date Fri, 10 Dec 2010 16:38:51 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.

The "FAQ" page has been changed by jmcg.
The comment on this change is: No more toothpicks, please..
http://wiki.apache.org/httpd/FAQ?action=diff&rev1=27&rev2=28

--------------------------------------------------

  Check out the [[http://httpd.apache.org/docs/current/misc/perf-tuning.html|performance tuning
page]].
  
  == What are "regular expressions"? ==
- Regular expressions are a way of describing a pattern - for example, "all the words that
begin with the letter A" or "every 10-digit phone number" or even "Every sentence with two
commas in it, and no capital letter Q". Regular expressions (aka "regex"s) are useful in Apache
because they let you apply certain attributes against collections of files or resources in
very flexible ways - for example, all .gif and .jpg files under any "images" directory could
be written as /\/images\/.*(jpg|gif)$/.
+ Regular expressions are a way of describing a pattern - for example, "all the words that
begin with the letter A" or "every 10-digit phone number" or even "Every sentence with two
commas in it, and no capital letter Q". Regular expressions (aka "regex"s) are useful in Apache
because they let you apply certain attributes against collections of files or resources in
very flexible ways - for example, all .gif and .jpg files under any "images" directory could
be written as `/images/.*(jpg|gif)$`. Note that httpd doesn't need the delimiting `//` so
as to avoid "toothpicks" when matching URIs or paths, like: `/\/foo\/bar\/?/`
  
  The best overview around is probably the [[http://perldoc.perl.org/perlre.html|one which
comes with Perl]].  Apache's regular expressions use [[http://www.pcre.org/|PCRE - Perl Compatible
Regular Expressions]].
  
@@ -295, +295 @@

  The mod_info module allows you to use a Web browser to see how your server is configured.
Among the information it displays is the list of modules and their configuration directives.
The "current" values for the directives are not necessarily those of the running server; they
are extracted from the configuration files themselves at the time of the request. If the files
have been changed since the server was last reloaded, the display will not match the values
actively in use. If the files and the path to the files are not readable by the user as which
the server is running (see the User directive), then mod_info cannot read them in order to
list their values. An entry will be made in the error log in this event, however.
  
  == My .htaccess files are being ignored. ==
- This is almost always due to your AllowOverride directive being set incorrectly for the
directory in question. If it is set to None then .htaccess files will not even be looked for.
If you do have one that is set, then be certain it covers the directory you are trying to
use the .htaccess file in. This is normally accomplished by ensuring it is inside the proper
Directory container.
+ This is almost always due to your AllowOverride directive being set incorrectly for the
directory in question. If it is set to None then .htaccess files will not even be looked for.
That is a good thing. If you have access to edit the httpd.conf, you should not use .htaccess
files, ever. If your customers do need support for .htaccess, make sure that AllowOverride
is set to something sensible (i.e.: Not All).
+ Be certain it covers the directory you are trying to use the .htaccess file in. This is
normally accomplished by ensuring it is inside the proper Directory container.
  
- You can tell if this is your problem by adding nonsense text to your .htaccess file and
reloading the page.  If you ''do not'' get a server error, then Apache is not reading your
.htaccess file.
+ You can tell if this is your problem by adding nonsense text to your .htaccess file and
reloading the page.  If you ''do not'' get a server error, then Apache httpd is not reading
your .htaccess file.
  
  == Why do I get a "Forbidden" message whenever I try to access a particular directory? ==
  This message is generally caused because either
@@ -307, +308 @@

  
  You can determine which case applies to your situation by checking the error log.
  
- In the case where file system permission are at fault, remember that not only must the directory
and files in question be readable, but also all parent directories must be at least searchable
(i.e., chmod +x /directory/path) by the web server in order for the content to be accessible.
+ In the case where file system permission are at fault, see [[13PermissionDenied|(13) Permission
Denied]] for more info.
  
  == Why do my files appear correctly in Internet Explorer, but show up as source or trigger
a save window with Netscape; or, Why doesn't Internet Explorer render my text/plain document
correctly? ==
  MS Internet Explorer (MSIE) and Netscape handle mime type detection in different ways, and
therefore will display the document differently. In particular, IE sometimes relies on the
file extension or the contents of the file to determine the mime type. This can happen when
the server specifies a mime type of application/octet-stream or text/plain. This behavior
violates the the HTTP standard and makes it impossible to deliver plain text documents to
MSIE clients in some cases. More details are available on MSIE's mime type detection behavior
in an MSDN article and a note by Alan J. Flavell.

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Mime
View raw message