Permalink
Browse files

Add auth_skip_docroot server config variable (Christian Hennig)

At startup Yaws normally searches the entire docroot for .yaws_auth
files. For very large docroot directories, the time required to
perform the search can result in unacceptably long startup times. To
allow for large docroot directories, add auth_skip_docroot server
config variable which, if set to true, prevents Yaws from searching
the docroot for .yaws_auth files. The variable defaults to false.

Add documentation for auth_skip_docroot variable.

Also clean up some whitespace and typos in the yaws.conf.5 man page.
  • Loading branch information...
1 parent 88c4e83 commit 5155b86141bca2a0b76eba613316024b7ad12051 @vinoski vinoski committed Aug 23, 2010
Showing with 83 additions and 53 deletions.
  1. +6 −0 doc/yaws.tex
  2. +6 −1 include/yaws.hrl
  3. +57 −48 man/yaws.conf.5
  4. +14 −4 src/yaws_config.erl
View
@@ -2204,6 +2204,12 @@ \section{Server Part}
This makes the server serve all its content from
Directory.
+\item \verb+auth_skip_docroot = true | false+ -
+ If true, the docroot will not be searched for
+ \verb+.yaws_auth+ files. This is useful when the docroot
+ is quite large and the time to search it is prohibitive
+ when \Yaws\ starts up. Defaults to false.
+
\item \verb+partial_post_size = Integer+ -
When a \Yaws\ file receives large POSTs, the
amount of data received in each chunk is
View
@@ -115,7 +115,7 @@
%% flags for sconfs
-define(SC_ACCESS_LOG, 1).
-define(SC_ADD_PORT, 2).
--define(SC_STATISTICS, 4).
+-define(SC_STATISTICS, 4).
-define(SC_TILDE_EXPAND, 8).
-define(SC_DIR_LISTINGS, 16).
-define(SC_DEFLATE, 32).
@@ -124,6 +124,7 @@
-define(SC_FCGI_TRACE_PROTOCOL, 512).
-define(SC_FCGI_LOG_APP_ERROR, 1024).
-define(SC_FORWARD_PROXY, 2048).
+-define(SC_AUTH_SKIP_DOCROOT, 4096).
-define(SC_DEF, ?SC_ACCESS_LOG bor ?SC_ADD_PORT).
@@ -150,6 +151,8 @@
(((SC)#sconf.flags band ?SC_FCGI_LOG_APP_ERROR) /= 0)).
-define(sc_forward_proxy(SC),
(((SC)#sconf.flags band ?SC_FORWARD_PROXY) /= 0)).
+-define(sc_auth_skip_docroot(SC),
+ (((SC)#sconf.flags band ?SC_AUTH_SKIP_DOCROOT) /= 0)).
-define(sc_set_access_log(SC, Bool),
@@ -178,6 +181,8 @@
Bool)}).
-define(sc_set_forward_proxy(SC, Bool),
SC#sconf{flags = yaws:flag(SC#sconf.flags, ?SC_FORWARD_PROXY, Bool)}).
+-define(sc_set_auth_skip_docroot(SC, Bool),
+ SC#sconf{flags = yaws:flag(SC#sconf.flags,?SC_AUTH_SKIP_DOCROOT,Bool)}).
Oops, something went wrong.

0 comments on commit 5155b86

Please sign in to comment.