Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jun 21, 2012
  1. @vinoski

    add reverse proxy intercept module capability

    vinoski authored
    Users can now specify an interception module that can rewrite requests and
    responses as they pass through the Yaws reverse proxy. See the
    documentation for details (yaws.conf.5 man page or the yaws.pdf file).
    Also add new set_header, get_header, and delete_header functions to the
    yaws_api module to allow intercept modules and arg rewriters to more easily
    examine and modify #headers{} records.
    Add new tests for the new header manipulation functions and for the reverse
    proxy interception feature.
Commits on May 11, 2012
  1. @capflam

    Add support for precompressed static files

    capflam authored
    By setting use_gzip_static to true in deflate options, in a vhost
    configuration, It is possible to serve precompressed versions of
    static files. Yaws will look for precompressed files in the same
    location as original files that end in ".gz".
    Only files that do not fit in the cache are concerned and the mtime
    of a precompressed file must be higher than the one of original file.
  2. @capflam

    Improve how the responses compression is handled

    capflam authored
    Among other things, we can now disable the compression in yaws scripts by
    returning '{header, {content_encoding, "identity"}}'.
    A bug was also fixed when part of a large file is requested. The response
    content length was calculated using the file size and not the part size.
Commits on May 3, 2012
  1. @capflam

    Make the parameter "x_forwarded_for_log_proxy_whitelist" obsolete

    capflam authored
    This parameter is now ignored and throws a warning when yaws starts.
    If necessary, it can be replaced by a simple logger_mod on top of
    yaws_log. To explain how to write such module, an example was added
    into the www directory (www/logger_mod.yaws).
Commits on Apr 25, 2012
  1. @capflam

    Add options to configure deflate compression behaviour

    capflam authored
    By adding "<deflate> ... </deflate>" structure in vhosts configuration,
    it is possible to configure how deflate compression will be applied
    and when it will come into effect. Now we can:
     * define the smallest response size that will be compressed
     * define the compression level to be used
     * specify the zlib compression window size
     * specify how much memory should be allocated for the internal
       compression state
     * choose the strategy used to tune the compression algorithm
    All these parameters are used when a zlib stream is initialized for
    It is also possible to define all compressible mime types.
    Here is an example:
    <server localhost>
      deflate = true
        min_compress_size = 4096
        compression_level = best_compression
        mime_types        = defaults, image/*
        mime_types        = application/xml, application/xhtml+xml, application/rss+xml
        mem_level         = 9
        strategy          = default
        window_size       = 15
  2. @capflam
Commits on Feb 2, 2012
  1. @capflam

    Allow the server signature to be defined per virtual server

    capflam authored
    Now, we can use the 'server_signature' directive into the server part
    to overload the global one for specific virtual server.
Commits on Sep 26, 2011
  1. @vinoski

    add config setting for acceptor pool size

    vinoski authored
    Add new config setting to allow the size of the acceptor process pool
    to be set to something other than the default. The default size is the
    same as what it was prior to this change. Also add documentation for
    the new setting, and augment the yaws.conf.template with information
    about it.
Commits on May 24, 2011
  1. @capflam @vinoski

    add shaper directive to control access (capflam)

    capflam authored vinoski committed
    inspired by the mod_bwshare module of Apache, add the shaper directive
    to control access to virtual servers. Access can be controlled based
    on the client's IP address. It is also possible to throttle HTTP
    requests based on the client's download rate. External modules used to
    shape the traffic must implement the new behaviour yaws_shaper.
  2. @capflam @vinoski

    support external handler to interpret php scripts (capflam)

    capflam authored vinoski committed
    phpfcgi is now deprecated. Instead, you must use php_handler. This
    directive is used to customize the handler to interpret .php files. It
    can be one of the following definitions:
      - php_handler = <cgi, Filename>
      - php_handler = <fcgi, Host:Port>
      - php_handler = <extern, Module:Function | Node:Module:Function>
    If there is no php_handler or deprecated phpfcgi directive, we use the
    value of php_exe_path. Its default value is "/usr/bin/php-cgi" but it
    can be customized.
  3. @capflam @vinoski

    allow multiple listen directives per server (capflam)

    capflam authored vinoski committed
    Sometimes, a virtual server must be bound to several IP
    addresses. Previously you had to duplicate virtual server
    configuration and change the address to listen on.
    Now, multiple Listen directives are allowed without any
    duplication. For example, if your server must listen on loopback
    address on both IPv4 and IPv6, your server part may be:
      <server >
        port = 80
        listen =
        listen = ::1
  4. @capflam @vinoski

    server-specific logger_mod and auth_mod (capflam)

    capflam authored vinoski committed
    Make logger_mod and auth_mod configuration variables local to each
    virtual server. The logger_mod variable can be used to customize
    access and auth messages. The auth_log variable previously was global,
    but it now lives in the server configuration and the global variable
    is deprecated.
    The new behaviour yaws_logger must be used to define external modules
    to log messages.
Commits on May 23, 2011
  1. @capflam @vinoski

    add control for "Expires" and "Cache-Control" response headers (capflam)

    capflam authored vinoski committed
    Allow an expires list in the server configuration and add "Expires"
    and "Cache-Control" headers in responses if the mime type of the
    document matches an element of this list. Like the Apache mod_expires
    module, the "expires" configuration directive controls the setting of
    the Expires HTTP header and the max-age directive of the Cache-Control
    HTTP header in server responses. The expiration date can be relative
    to either the time the source file was last modified or to the time of
    the client access. It is possible to have multiple expires directives
    for a virtual server.
    Here is an example:
      <server >
        expires = <image/gif, access+2592000> <image/png, access+2592000>
        expires = <image/jpeg, access+2592000> <text/css, access+2592000>
        expires = <application/javascript, modify+2592000>
  2. @capflam @vinoski

    authorization improvements (capflam)

    capflam authored vinoski committed
    There are two changes here. The first improves the implementation of
    authentication mechanisms, like authentication inside all docroots and
    recursion through subdirectories (if you define an authentication
    policy for a directory, then it is automatically applied to any
    subdirectories, except those with their own authentication policy). It
    also adds the docroot directive in auth structures (or .yaws_auth
    files) to restrict it to a specific docroot (no docroot configured
    means all docroots). We can now also configure authentication for
    specific files instead of just directories.
    The second one adds ACLs (Access Control List), like Apache's
    mod_access module, to protect data. You can add directives in auth
    structures (or .yaws_auth files) to control access to particular parts
    of the server based on the client IP address. The allow and deny
    directives are used to specify which clients are or are not allowed to
    access to the server, while the order directive sets the default
    access state and configures how the allow and deny directives interact
    with each other. Use "/" as default directory in auth structure;
    yaws.conf manpage has been updated accordingly.
    Here is an example:
      <server >
          docroot = /var/www/yakaz/admin
          deny    = all
          allow   =,
          order   = deny,allow
Commits on Apr 20, 2011
  1. @vinoski

    major trailing whitespace cleanup

    vinoski authored
    Remove trailing whitespace in all .erl and .hrl files in the
    If you're an emacs user, you can easily see trailing whitespace using
    settings like these in your ~/.emacs file:
    (setq-default show-trailing-whitespace t)
    (set-face-background 'trailing-whitespace "slate gray")
    You can also delete trailing whitespace automatically when you save
    your Erlang sources by setting the emacs before-save-hook in your
    ~/.emacs file like this:
    (add-hook 'before-save-hook
              '(lambda () (if (eq major-mode 'erlang-mode)
Commits on Apr 3, 2011
  1. @vinoski

    add configurable access logging

    vinoski authored
    Add the global logger_mod config variable to allow for customized
    access logging. Document logger_mod in yaws.conf.5 and yaws.tex.
Commits on Mar 5, 2011
  1. Some dialyzer fixes - no real bugs, just enhancements, removed the de…

    …precated feature of fdsrv, and fixed some bugs recently introduced by Tobbe and yaws_session_server
Commits on Jan 6, 2011
  1. @nthauvin

    Added a comment in yaws.hrl

    nthauvin authored
  2. @nthauvin
Commits on Oct 21, 2010
  1. @lefant @vinoski

    add implementation of X-Forwarded-For header (Fabian Linzberger)

    lefant authored vinoski committed
    * Add x_forwarded_for_log_proxy_whitelist global config parameter and
      parsing for it.
    * Add x_forwarded_for header in record definition and collection
      (based on code by Chris Double he mentions on
    * For yaws_server:maybe_access_log/3: if originating IP is present in
      x_forwarded_for_log_proxy_whitelist, log last IP found in
      x-forwarded-for header instead of originating IP
Commits on Oct 1, 2010
  1. @avtobiff

    Fixed and updated SSL verify options.

    avtobiff authored
    * Fixed documentation for verify values to correspond to Erlang's SSL
    * Updated documentation to include new SSL implementation options.
    * Updated #ssl{} and yaws:ssl_listen_opts/2 to include
Commits on Aug 23, 2010
  1. @vinoski

    Add auth_skip_docroot server config variable (Christian Hennig)

    vinoski authored
    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.
Commits on Jul 21, 2010
  1. @vinoski

    add support for PHP FCGI applications (Hans-Christian Esperer)

    vinoski authored
    Add server configuration support for PHP FCGI applications. Modify
    dispatching support to invoke a PHP FCGI server for .php files if
    Modify existing FCGI application server configuration to use a single
    separate fields. Use the same approach for the phpfcgi field. Patch up
    yaws_cgi.erl for these changes.
    Enhance yaws.conf.5 and yaws.tex to describe the new PHP FCGI
    Also fix a number of editorial issues in yaws.tex.
Commits on May 10, 2010
  1. @vinoski

    Use gconf keepalive_timeout for connection lifetime (Brady McCary)

    vinoski authored
    Previously persistent connections were held open for a hard-coded 30
    seconds, and if no request was received in that time, Yaws closed the
    connection. Change this behavior to use the gconf keepalive_timeout
    field to determine the amount of time the connection is held open
    rather than using a hard-coded timeout. The default is still 30
    seconds, but users can change the default by specifying a different
    value for keepalive_timeout in their Yaws configuration.
    Also, fix yaws.tex to document the keepalive_timeout setting as well
    as other recent changes such as max_connections and keepalive_maxuses.
Commits on Apr 14, 2010
  1. Added a new configuration parameter called "keepalive_maxuses" which …

    Thomas O'Dowd authored
    the yaws admin to close persistant connections after X number of uses. This
    is handy for some types of system which may generate a lot of garbage in the
    process in the erlang VM or for other reasons where you want to limit how
    many requests can be processed on a single connection. The default setting
    remains unlimited.
Commits on Apr 7, 2010
  1. Added a new configuration parameter to allow the administrator to con…

    Thomas O'Dowd authored
    the erlang virtual machines garbage collection knobs when spawning a new
    process to handle incoming connections. The option is called "process_options".
    Its default value is the empty list which uses erlangs default options as
    is the case now. This is useful for long lived connections which can generate
    a lot of garbage if left untapped. Use with care :-)
Commits on Mar 2, 2010
  1. The default value for partial_post_size was nolimit, not a good defau…

    Claes Wikstrom authored
    …lt value and also erroneoulsy documented
Commits on Dec 15, 2009
  1. @vinoski

    do not pass the --id option if the default id is used

    vinoski authored
    The default id in the code is represented as the string "default". If
    the --id option passes default to set the id, it becomes the atom
    default which of course differs from the string "default". By not
    using --id to specify the default id, we get the value "default" as
    the default.
    Make sure ids passed in via the --id option that yaws_sup.erl sees as
    atoms are converted to lists. This matches what's done for other
    options involving ids such as --check and --stop.
    Other changes in this commit make sure that the $HOME/.yaws/yaws/ID
    path is used consistently across the code and documentation, and also
    a couple minor whitespace/indentation cleanups.
Commits on Dec 2, 2009
Commits on Nov 29, 2009
Commits on Nov 23, 2009
  1. @ericliang

    add the soap_srv_mods support, which can setup soap serve modules whi…

    ericliang authored committed
    …le yaws start.
Commits on Aug 17, 2009
Commits on Jul 10, 2009
  1. cgi support

Commits on Jul 3, 2009
Commits on Jun 10, 2009
  1. @oliv3
Something went wrong with that request. Please try again.