Skip to content
This repository

Yaws webserver

Merge pull request #175 from yakaz/fcgi-ipv6

IPv6 address parsing + IPv6 lookup for FastCGI and reverse proxy
latest commit 1ff49f3413
Steve Vinoski vinoski authored
Octocat-spinner-32 applications fix compiler warnings in Yaws applications April 04, 2013
Octocat-spinner-32 bin "" March 04, 2002
Octocat-spinner-32 c_src remove unused -DDYNAMIC_DRIVER from c_src/Makefile March 27, 2014
Octocat-spinner-32 contrib add rebar support (Tuncer Ayaz and Steve Vinoski) May 07, 2011
Octocat-spinner-32 debian debian patch from David Welton applied May 24, 2004
Octocat-spinner-32 doc Add a nslookup_pref global parameter April 15, 2014
Octocat-spinner-32 ebin "" June 10, 2002
Octocat-spinner-32 examples Refactor WebSockets and add support of optional callback functions February 11, 2013
Octocat-spinner-32 include Add a nslookup_pref global parameter April 15, 2014
Octocat-spinner-32 man Add a nslookup_pref global parameter April 15, 2014
Octocat-spinner-32 munin README.munin June 12, 2009
Octocat-spinner-32 priv update priv/mime.types from Apache April 13, 2014
Octocat-spinner-32 rel rel: add Windows scripts August 18, 2013
Octocat-spinner-32 scripts scripts/Install: Create ${etcdir}/rc.d on FreeBSD April 14, 2014
Octocat-spinner-32 src Merge pull request #175 from yakaz/fcgi-ipv6 April 16, 2014
Octocat-spinner-32 ssl whitespace cleanup October 31, 2011
Octocat-spinner-32 test Merge pull request #175 from yakaz/fcgi-ipv6 April 16, 2014
Octocat-spinner-32 win32 Add the way to configure the version of sendfile method to use September 19, 2013
Octocat-spinner-32 www add virtual server redirect conf example to redirect.yaws March 12, 2014
Octocat-spinner-32 .gitignore allow extra app dependencies for yaws.app to be configured April 11, 2014
Octocat-spinner-32 ChangeLog whitespace cleanup October 31, 2011
Octocat-spinner-32 LICENSE whitespace cleanup October 31, 2011
Octocat-spinner-32 Makefile dialyzer maintenance April 01, 2014
Octocat-spinner-32 README Add note about running rebar get-deps before rebar compile October 05, 2013
Octocat-spinner-32 README.osx Add README.osx for instructions on installing on OSX using Homebrew October 07, 2013
Octocat-spinner-32 README.pkg-config whitespace cleanup October 31, 2011
Octocat-spinner-32 README.win32-cygwin whitespace cleanup October 31, 2011
Octocat-spinner-32 _build.cfg Adding files for Erlware. A very rough packaging of 1.76 has been rel… May 15, 2008
Octocat-spinner-32 config.guess "" March 13, 2004
Octocat-spinner-32 config.sub "" March 13, 2004
Octocat-spinner-32 configure.in allow extra app dependencies for yaws.app to be configured April 11, 2014
Octocat-spinner-32 include.mk.in Add the way to configure the version of sendfile method to use September 19, 2013
Octocat-spinner-32 install-sh added ability to run as different user than root November 27, 2002
Octocat-spinner-32 known_dialyzer_warnings dialyzer maintenance April 01, 2014
Octocat-spinner-32 rebar.config fix #173: set ibrowse dep to v3.0.4 in rebar.config March 20, 2014
Octocat-spinner-32 rebar.config.script allow extra app dependencies for yaws.app to be configured April 11, 2014
Octocat-spinner-32 two-mode-mode.el updates to make two-mode-mode work with emacs 23 May 30, 2010
Octocat-spinner-32 vsn.mk prepare for 1.98 November 04, 2013
Octocat-spinner-32 yaws.pc.in add pkg-config support contributed by Olivier Girondel January 29, 2009
Octocat-spinner-32 yaws.rel.src yaws.rel.src was missing and better error printuts when yaws.conf is … September 01, 2008
README
This is yaws, a webserver for dynamic content written in Erlang.


To build and install


0. Get and install an Erlang system (http://www.erlang.org)

1. If you've cloned the source from github and you want to build using
   configure and make, note there is no ./configure script in the
   source, so create one:

# autoconf

1.b Install build-deps. On Ubuntu/debian this is pretty much equal to
# apt-get build-dep yaws

2. You can build using rebar:

# rebar get-deps compile

  or via configure and make:

# ./configure --prefix=/usr/local

  If using rebar, you'll get a local installation with yaws in
  $HOME/bin and the yaws configuration file in $HOME/yaws.conf. If
  using configuration and make, the build will be configured by
  default for installation under /usr/local including var files in
  /usr/local/var/run/yaws and etc files in /usr/local/etc/yaws.

  NOTE: With configure, you can also change the target directory for
  etc and var directories by using:

  --localstatedir=DIR     for files that should go in /var
  --sysconfdir=DIR        for files that should go in /etc
  --disable-pam           If we for some reason do not want pam support
  --with-extrainclude=DIR Will add DIR to the include path
                          May be useful if e.g. pam is installed
		          somewhere where its usually not found
  --with-defaultcharset=String  Will set the default charset used
                        in generated page headers. Usually never needed.

  This way you can precisely control where you install Yaws (This is
  useful for computers where you do not have right access to the
  standard systemdirs).

  For example:

    ./configure --prefix=/home/install/yaws --localstatedir=/home/install/yaws/var --sysconfdir=/home/install/etc

2b. Note to packagers (rpm, deb ...) All install targets support the
    DESTDIR variable. Thus, if we do

    ./configure --prefix=/usr; make

    we can subsequently do:

    DESTDIR=/foo/bar make install

    All yaws files will be installed under DESTDIR, but all
    code will assume yaws should be installed under /usr.

3. make

    This will build the system.

   make docs

    (Optional) You can issue this command if you want to build Yaws
    documentation.

   make local_install

    This will create an executable script in the $HOME/bin directory
    and a config file in $HOME/yaws.conf. This is for developers
    only. This is the only type of installation "rebar compile"
    supports.

4. To test the build, start it as

   ./bin/yaws -i

   If you used rebar to compile yaws, you can alternatively start yaws
   with

   $HOME/bin/yaws -i

   Either approach will start a webserver at http://0.0.0.0:8000 .
   Terminate through ^C, or ^G followed by q, or

   > init:stop()

   NOTE: If you've used rebar to build the system, none of the
   following directions apply. With rebar only local installations are
   supported.

5. as root make install

6. as root start as

   /usr/local/bin/yaws -i

   This starts an interactive system.

7. With the default yaws.conf file, this will create a webserver at
   http://${host} and one at https://${host}

8. as root edit /usr/local/etc/yaws/yaws.conf

9. Create content in /usr/local/var/yaws/www

10a. Start as /usr/local/bin/yaws --daemon --heart
     This will start a daemon (--daemon) which will be autorestarted when/if
     it crashes or hangs (--heart)
     Also, for most unices, we create proper start scripts in
     /etc/init.d (sysconfdir)

10b. Or start interactive system as /usr/local/bin/yaws -i

11.  Example: Here is how I compile/start the yaws system that runs
     at http://yaws.hyber.org (Ubuntu server system)

     # autoconf
     # ./configure --sysconfdir=/etc
     # make && make install
     # /etc/init.d/yaws start



Something went wrong with that request. Please try again.