RSS Git Download  Clone
..
  Local documentation and adjustments for deployment 4 years, 9 months ago
  SessionTest.pm 2kB documentation and adjustments for deployment 4 years, 9 months ago
  README.txt
deployment as a lighttpd proxy server: in /etc/lighttpd/lighttpd.conf: server.modules += ( "mod_accesslog" ) # just ensure it's in the list accesslog.filename = "/var/log/lighttpd/access.log" * for local lan using PiHole DNS, register a local DNS domain/IP combination eg sessiontest.zbox.lan -> 192.168.1.112 in /etc/lighttpd/conf-available/20-proxy.conf (ensure symlinked in conf-enabled) $HTTP["host"] =~ "^sessiontest.zbox.lan$" { server.document-root = "/home/raj/apps/SessionTest/public/" proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 5001, # "host" => "/tmp/sessiontest.sock", "check-local" => "disable", ) ) ) } * command-line startup: (only Gazelle & Starlet accept following systax for socket): start_server --path /tmp/sessiontest.sock -- plackup -s Gazelle|Starlet \ -E deployment -a bin/app.psgi for Starman (doesn't work directly because socket file is 775 raj:raj, needs to be 777 because lighttpd runs as www-data): plackup -E production -s Starman --workers=2 -l /tmp/sessiontest.sock \ -a bin/app.pl does work if socket then manually set to 777 (no use for server reboot): chmod 777 /tmp/sessiontest.conf another way is to use sudo to start plackup server as user www-data, but root doesn't know about raj perl5 lib: sudo -u www-data plackup [...] or start starman directly (same issue of access to perl5 libs): sudo /home/raj/perl5/bin/starman --user www-data --listen /tmp/sessiontest.sock \ --workers 2 -a bin/app.psgi * daemontools (works) [see also RWGPS README.txt] # /service/rwgps/run: #!/bin/sh export PERL5LIB='/home/raj/perl5/lib/perl5:/home/raj/apps/SessionTest/lib' exec 2>&1 setuidgid www-data \ /home/raj/perl5/bin/plackup -E deployment -s Starman --workers=3 \ -l /tmp/sessiontest.sock -a /home/raj/apps/SessionTest/bin/app.psgi * init.d - see bin/sessiontest.pl, init.d config APP_USER=raj / APP_GROUP=raj