Contents
$ wget -c http://yaws.hyber.org/download/yaws-1.88.tar.gz $ tar zxvf yaws-1.88.tar.gz $ cd yaws $ ./configure $ make $ make install
etc files went into /usr/local/etc
executables went into /usr/local/bin
library files went into /usr/local/lib/yaws
var files went into /usr/local/var
default docroot went into /usr/local/var/yaws/www
./configure --help
# /usr/local/bin/yaws -v Yaws 1.88
/usr/local/bin/yaws --help
usage:
yaws -i | --interactive -- interactive (no daemon) mode
yaws -w | --winteractive -- cygwin interactive (werl)
yaws --daemon -- daemon mode
Auxiliary flags for the daemon:
--id Id -- set system id
--debug -- debug mode
--nodebug -- turn off debug mode
--conf File -- set config file
--tracetraf -- trace traffic
--tracehttp -- trace http traffic
--traceout -- trace output to stdout
--version -- print version
--pa path -- add load path
--mnesiadir dir -- start Mnesia in dir
--proto_dist Mod -- use Mod for distrib
--sname xxx -- start with sname xxx
--name xxx -- start with name xxx
--runmod mod -- call mod:start/0 at startup
--heart -- auto restart yaws if it crashes
--heart-restart=C,T -- allow C heart restarts in T seconds
--erlarg X -- pass argument X to /usr/bin/erl
--setcookie X -- set an erlang cookie
--run_erl X -- use run_erl with pipe-id X
--to_erl X -- connect to pipe-id X
--disable-kpoll -- pass +K false to erlang
ctl functions ...
yaws --hup [--id ID] -- hup the daemon, reload conf
yaws --stop [--id ID] -- stop the daemon
yaws --debug-dump [--id ID] -- produce a debug dump
yaws --status [--id ID] -- query the daemon status
yaws --load Modules -- load modules
yaws --ls -- list Yaws nodes and their status
yaws --ctltrace traffic|http -- toggle trace of running daemon
yaws --check YawsFile [IncDirs] -- test compile File
yaws --wait-started[=secs] [--id ID] -- wait for daemon to be ready
yaws --stats [--id ID] -- show daemon statisticslogdir = /usr/local/var/log/yaws ebin_dir = /usr/local/lib/yaws/examples/ebin ebin_dir = /usr/local/var/yaws/ebin include_dir = /usr/local/lib/yaws/examples/include max_connections = nolimit trace = false use_old_ssl = false copy_error_log = true log_wrap_size = 1000000 log_resolve_hostname = false fail_on_bind_err = true auth_log = true pick_first_virthost_on_nomatch = true use_fdsrv = false <server myarch> port = 80 listen = 0.0.0.0 docroot = /usr/local/var/yaws/www appmods = <cgi-bin, yaws_appmod_cgi> </server> <server localhost> port = 80 listen = 0.0.0.0 docroot = /tmp dir_listings = true statistics = true <auth> realm = foobar dir = / user = foo:bar user = baz:bar </auth> </server> <server myarch> port = 443 docroot = /tmp listen = 0.0.0.0 dir_listings = true <ssl> keyfile = /usr/local/etc/yaws/yaws-key.pem certfile = /usr/local/etc/yaws/yaws-cert.pem depth = 0 </ssl> </server>
# /usr/local/bin/yaws
http://myarch/
$ wget -c http://gr2.php.net/distributions/php-5.3.2.tar.bz2 $ tar jxvf php-5.3.2.tar.bz2 $ cd php-5.3.2 $ ./configure $ make $ make install
/usr/bin/php-cgi
cgi.force_redirect = 0
php_exe_path = /usr/local/bin/php-cgi
echo '<?php phpinfo(); ?>' | php | grep 'php.ini'
/usr/local/bin/php-cgi -b 3000
fcgi_app_server = localhost:3000
<server myarch> port = 80 listen = 0.0.0.0 docroot = /usr/local/var/yaws/www appmods = <cgi-bin, yaws_appmod_cgi> # ebal fcgi_app_server = localhost:3000 </server>
.yaws .php .cgi .fcgi
<?php phpinfo(); ?>
