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 15:58:57 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: Removing some outdated ``facts''..
http://wiki.apache.org/httpd/FAQ?action=diff&rev1=24&rev2=25

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

  
  Each log file requires a file descriptor, which means that if you are using separate access
and error logs for each virtual host, each virtual host needs two file descriptors. Each Listen
directive also needs a file descriptor.
  
- Typical values for <n> that we've seen are in the neighborhood of 128 or 250. When
the server bumps into the file descriptor limit, it may dump core with a SIGSEGV, it might
just hang, or it may limp along and you'll see (possibly meaningful) errors in the error log.
One common problem that occurs when you run into a file descriptor limit is that CGI scripts
stop being executed properly.
+ Typical values for <n> that we've seen are in the neighborhood of 1024 or 2048. When
the server bumps into the file descriptor limit, it may dump core with a SIGSEGV, it might
just hang, or it may limp along and you'll see (possibly meaningful) errors in the error log.
One common problem that occurs when you run into a file descriptor limit is that CGI scripts
stop being executed properly.
  
  As to what you can do about this:
  
   Reduce the number of Listen directives:: If there are no other servers running on the machine
on the same port then you normally don't need any Listen directives at all. By default Apache
listens to all addresses on port 80.
   Reduce the number of log files:: You can use mod_log_config to log all requests to a single
log file while including the name of the virtual host in the log file. You can then write
a script to split the logfile into separate files later if necessary. Such a script is provided
with the Apache distribution in the src/support/split-logfile file.
   Increase the number of file descriptors available to the server:: (see your system's documentation
on the limit or ulimit commands). For some systems, information on how to do this is available
in the performance hints page. There is a specific note for FreeBSD below.
- For Windows 95, try modifying your C:\CONFIG.SYS file to include a line like
- 
- FILES=300
- 
- Remember that you'll need to reboot your Windows 95 system in order for the new value to
take effect.
  
   "Don't do that" - try to run with fewer virtual hosts::
  Spread your operation across multiple server processes (using Listen for example, but see
the first point) and/or ports.
@@ -267, +262 @@

  == Why does Apache send a cookie on every response? ==
  Apache does not automatically send a cookie on every response, unless you have re-compiled
it with the mod_usertrack module, and specifically enabled it with the CookieTracking directive.
This module may help track users, and uses cookies to do this. If you are not using the data
generated by mod_usertrack, do not compile it into Apache.
  
+ == Why don't my cookies work? ==
+ Apache httpd passes on your Set-Cookie header, like any other header. If cookies do not
work it will be because your script does not work properly or your browser does not use cookies
or is not set-up to accept them.
- == Why don't my cookies work, I even compiled in mod_cookies? ==
- Firstly, you do not need to compile in mod_cookies in order for your scripts to work (see
the previous question for more about mod_cookies). Apache passes on your Set-Cookie header
fine, with or without this module. If cookies do not work it will be because your script does
not work properly or your browser does not use cookies or is not set-up to accept them.
- 
- 
- == How do I get Apache to send a MIDI file so the browser can play it? ==
- Even though the registered MIME type for MIDI files is audio/midi, some browsers are not
set up to recognize it as such; instead, they look for audio/x-midi. There are two things
you can do to address this:
- 
-  Configure your browser to treat documents of type audio/midi correctly:: This is the type
that Apache sends by default. This may not be workable, however, if you have many client installations
to change, or if some or many of the clients are not under your control.
-  Instruct Apache to send a different Content-type header for these files:: by adding the
following line to your server's configuration files:
- AddType audio/x-midi .mid .midi .kar
- 
- Note that this may break browsers that do recognize the audio/midi MIME type unless they're
prepared to also handle audio/x-midi the same way.
  
  == How do I add browsers and referrers to my logs? ==
  Apache provides a couple of different ways of doing this. The recommended method is to compile
the mod_log_config module into your configuration and use the CustomLog directive.

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


Mime
View raw message