Yaws 是一款HTTP高性能1.1网络服务器,特别适用于动态内容Web应用。 支持两种独立的操作模式:
- Yaws作为常规Web服务器守护程序运行的独立模式。 这是默认模式。
- Yaws作为嵌入式Web服务器在另一个Erlang应用程序中运行的嵌入式模式。
Yaws是一款HTTP高性能1.1 Web服务器,特别适用于动态内容Web应用程序。(Yaws is a HTTP high perfomance 1.1 webserver particularly well suited for dynamic-content web applications.)
Yaws 是一款HTTP高性能1.1网络服务器,特别适用于动态内容Web应用。 支持两种独立的操作模式:
名稱與所有者 | erlyaws/yaws |
---|---|
主編程語言 | Erlang |
編程語言 | Erlang (語言數: 14) |
平台 | |
許可證 | BSD 3-Clause "New" or "Revised" License |
創建於 | 2009-02-20 21:18:06 |
---|---|
推送於 | 2025-02-12 16:31:39 |
最后一次提交 | 2025-02-11 12:38:33 |
發布數 | 33 |
最新版本名稱 | yaws-2.2.0 (發布於 2024-07-13 18:41:00) |
第一版名稱 | yaws-1.81 (發布於 2009-03-10 00:02:39) |
星數 | 1.3k |
---|---|
關注者數 | 76 |
派生數 | 269 |
提交數 | 2.7k |
已啟用問題? | |
問題數 | 304 |
打開的問題數 | 33 |
拉請求數 | 103 |
打開的拉請求數 | 3 |
關閉的拉請求數 | 91 |
已啟用Wiki? | |
---|---|
已存檔? | |
是復刻? | |
已鎖定? | |
是鏡像? | |
是私有? |
This is Yaws, a webserver for dynamic content written in Erlang.
Get and install an Erlang system (http://www.erlang.org).
To compile Yaws, Erlang/OTP R17 or higher is required.
If you've cloned the source from github and you want to build using autotools,
note there is no ./configure script in the source, so create one:
$> autoreconf -fi
Install build dependencies. Required packages to compile Yaws are (based on
debian packages):
To build the documentation (optional), you also need to install:
On Ubuntu/debian this is pretty much equal to:
$> apt-get build-dep yaws
On MacOS and OS X, be sure the necessary Xcode command-line tools and
development environment are set up correctly by running the following
command:
xcode-select --install
Finally, to run the testsuites, yaws need to install:
You can build using rebar:
$> rebar get-deps compile
or via autotools:
$> ./configure --prefix=/usr/local
If using rebar, you'll get a "local installation" with Yaws script in ./bin
and the Yaws configuration file in ./etc/yaws.
If using autotools, the build will be configured by default for installation
under /usr/local. For more information about installation directories and
other supported options, see the configure help. Useful options are:
--with-defaultcharset=CHARSET specify default charset, i.e UTF-8
--with-extrainclude=DIR dir to include if e.g. pam is installed in some odd place
--with-erlang=PREFIX prefix where Erlang is installed (optional)
Note to packagers (rpm, deb ...) All install targets support the DESTDIR
variable. Thus, if we do
$> ./configure --prefix=/usr; make
we can subsequently do:
$> make install DESTDIR=/foo/bar
All Yaws files will be installed under DESTDIR, but all code will assume Yaws
should be installed under /usr.
Main make targets:
With autotools, to test the build, you should install it somewhere:
$> ./configure --prefix=$PWD/_inst && make install
$> $PWD/_inst/bin/yaws -i
If you used rebar to compile Yaws, you can alternatively start Yaws with
$> ./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.
NOTE: following commands may require root privileges, depending of the
installation prefix.
Just run:
$> make install
Then, to run Yaws, you should use its script:
$> ${bindir}/yaws -i
This starts an interactive system.
With the default yaws.conf file, this will create a webserver at
http://${host} and one at https://${host}.
You can adapt Yaws configuration by editing '${sysconfig}/yaws/yaws.conf'.
Start it using '--daemon' and '--heart' options:
$> ${bindir}/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 ${sysconfdir}/init.d
Example: Here is how I compile/start the yaws system that runs at
http://yaws.hyber.org (Ubuntu server system)
$> autoreconf -fi
$> ./configure --sysconfdir=/etc
$> make && make install
$> /etc/init.d/yaws start