Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 11-16-2013, 08:02 PM   #1
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Post RT on a kindle 3 (4, 5, PW) [tiny fast-cgi LAMP server test]

Right 1st: What is RT. http://bestpractical.com/rt/docs.html

2nd: Who wrote it? Jesse did, the guy who also brought you savory and the early X11 on a kindle hacks for the k3.

3rd: Twobob, why the hell are you doing this. Well. That's a tougher question to answer. a) because I would rather like to ask Jesse a completely unrelated question about his x11 build and this seemed like an amusing way to get his attention b) because using a kindle 3 (and all kindles actually from just this one build since it is built to run on them all) to be a LAMP server seemed like a pretty sexy, if stupid, thing to do and finally c) because RT is cool and I wanted to see if it could be run on something so tiny as a kindle.

4th: Wait a LAMP server on a kindle? Well... not really in the traditional sense, This will be Linux, Nginx(ot Lighthhtpd), Postgresql and Perl(or php) but that's /pretty/ close to a LAMP server.. so. I think we get a "Gimme" (or a mulligan, either way)

5th: So, what, like all from a debian loop mount? Pfft. too easy, this is all got to run natively, only loop mounts allowed will be to provide ext3 compatible storage on FAT.

6th: Well did it work? TBC:

Last edited by twobob; 11-16-2013 at 08:32 PM.
twobob is offline   Reply With Quote
Old 11-16-2013, 08:25 PM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Step 0: Get a compiler configured to build this stuff.
I'm going to use native arm debian compiler on my PC via qemu.
You can use w/e, I provide a download to the qemu ready debian image I used.

Step 1 and beyond...: Nginx: http://wiki.nginx.org/Main
I grabbed the source and configured like:

nginx-0.7.67
Quote:
CFLAGS="-O2 -march=armv6j -mtune=arm1136jf-s -mfpu=vfp -pipe -fomit-frame-pointer -fno-stack-protector -U_FORTIFY_SOURCE" CXXFLAGS=${CFLAGS} LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath,/mnt/us/extensions/nginx/usr/lib" ./configure --prefix=/mnt/us/extensions/nginx/usr --with-pcre --user=root --group=root --with-http_perl_module --with-perl_modules_path=/mnt/us/extensions/perl/usr/lib/5.10.1 --with-perl=/mnt/us/extensions/perl/usr/bin/perl --http-fastcgi-temp-path=/mnt/us/extensions/system/fastcgi
Quote:
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ md5: using system crypto library
+ sha1 library is not used
+ using system zlib library

nginx path prefix: "/mnt/us/extensions/nginx/usr"
nginx binary file: "/mnt/us/extensions/nginx/usr/sbin/nginx"
nginx configuration prefix: "/mnt/us/extensions/nginx/usr/conf"
nginx configuration file: "/mnt/us/extensions/nginx/usr/conf/nginx.conf"
nginx pid file: "/mnt/us/extensions/nginx/usr/logs/nginx.pid"
nginx error log file: "/mnt/us/extensions/nginx/usr/logs/error.log"
nginx http access log file: "/mnt/us/extensions/nginx/usr/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "/mnt/us/extensions/system/fastcgi"
shove that on the kindle.

we also want to build lighttpd, just for the spawn-fcgi it has. (meh, call me lazy)

we configure it thusly:

lighttpd-1.4.19
Quote:
CFLAGS="-O2 -march=armv6j -mtune=arm1136jf-s -mfpu=vfp -pipe -fomit-frame-pointer -fno-stack-protector -U_FORTIFY_SOURCE" CXXFLAGS=${CFLAGS} LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath,/mnt/us/extensions/lighttpd/usr/lib" ./configure --prefix=/mnt/us/extensions/lighttpd/usr --with-fam --with-bzip2 --with-zlib --with-pcre
and shove that on the kindle

so next we need a database engine. I'm going with postgresql (mainly because mysql is bit heavy, doesn't natively support arm processor and finally is a total PITA to build) NOTE: The kindle has sqlite and RT supports that but meh. I wanted something a bit more hunky.

we configure like so:

postgresql-8.4-8.4.2
Quote:
CFLAGS="-O2 -march=armv6j -mtune=arm1136jf-s -mfpu=vfp -pipe -fomit-frame-pointer -fno-stack-protector -U_FORTIFY_SOURCE" CXXFLAGS=${CFLAGS} LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath,/mnt/us/extensions/postgresql/usr/lib" ./configure --prefix=/mnt/us/extensions/postgresql/usr --with-libxml --with-libxslt --with-system-tzdata=/mnt/us/extensions/postgresql/usr/share/zoneinfo/ --with-python --with-perl
we also hack thru the source removing all the getuid() checks (there are 4 IIRC) so we can run it as root.

Also we could adjust the file permission checks to be 755 (say) rather than 700 since this is gonna live on a kindle and no one should be insane enough to ACTUALLY use this in production to say, run a business. Like really. Whut? Don't. or lock it down like crazy and actually add some user accounts etc... (you are like totally on your own there)

and shove that on the kindle

Now... we also need some space for that to run in. It won't run on FAT (I couldn't get it to anyways) so let' give it a bit of ext3 space

Quote:
dd if=/dev/zero of=/mnt/us/extensions/postgresql/data/data.ext3 bs=1M count=150
mkfs.ext3 /mnt/us/extensions/postgresql/data/data.ext3
tune2fs -i 0 -c 0 /mnt/us/extensions/postgresql/data/data.ext3
mkdir /mnt/us/extensions/postgresql/data/rt
mount -o loop -t ext3 /mnt/us/extensions/postgresql/data/data.ext3 /mnt/us/extensions/postgresql/data/rt
we need to initialize that space ready for a database so we run

/mnt/us/extensions/postgresq/usr/bin/initdb /mnt/us/extensions/postgresql/data/rt

done

Next up we need perl

Configuring it goes like this:

perl-5.10.x
Quote:
CFLAGS="-O2 -march=armv6j -mtune=arm1136jf-s -mfpu=vfp -pipe -fomit-frame-pointer -fno-stack-protector -U_FORTIFY_SOURCE" CXXFLAGS=${CFLAGS} LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath,/mnt/us/extensions/perl/usr/lib" ./Configure -des -Dprefix=/mnt/us/extensions/perl/usr -Dvendorprefix=/mnt/us/extensions/perl/usr -Dpager="/usr/bin/less" -Duseshrplib
(you can remove the -des and do it more slowly, up to you, I've done it both ways in the past)

we also need to add one or two missing required modules via cpan.

MISSING RT MODULES to get via CPAN
Quote:
HTTP::Request::Common LWP Encode Crypt::Eksblowfish Module::Versions::Report List::MoreUtils DBI Devel::StackTrace HTTP::Message Text::Password::Pronounceable Devel::GlobalDestruction Time::ParseDate Tree::Simple HTML::Scrubber HTML::Quoted Mail::Mailer Data::GUID HTML::Mason HTML::Entities LWP::Simple Symbol::Global::Name DateTime::Format::Natural Plack Class::Accessor Text::Wrapper Regexp::Common::net::CIDR Log::Dispatch HTML::FormatText::WithLinks::AndTables DateTime CGI::Emulate::PSGI Text::Quoted Regexp::IPv6 CSS::Squish DateTime::Locale CGI::PSGI Apache::Session Date::Extract HTML::Mason::PSGIHandler MIME::Entity Locale::Maketext::Lexicon Module::Refresh Role::Basic Date::Manip HTML::RewriteAttributes Text::Template XML::RSS Text::WikiFormat DBIx::SearchBuilder File::ShareDir Regexp::Common HTML::FormatText::WithLinks Mail::Header Locale::Maketext::Fuzzy Email::Address::List Net::CIDR JSON UNIVERSAL::require Email::Address Plack::Handler::Starlet URI::QueryParam URI MIME::Types FCGI::ProcManager FCGI GD::Text GD GD::Graph PerlIO::eol GnuPG::Interface IPC::Run GraphViz Data::ICal LWP::UserAgent Crypt::SSLeay Net::SSL LWP::Protocol::https Mozilla::CA Apache::Request Apache::DBI Apache::DBI DBD::Pg Convert::Color SOME LWP::UserAgent Mozilla::CA Net::SSL LWP::Protocol::https Crypt::SSLeay Convert::Color DBD::Pg Apache::DBI URI MIME::Types URI::QueryParam Data::ICal Apache::DBI Apache::Request HTTP::Request::Common LWP IPC::Run GraphViz PerlIO::eol GnuPG::Interface GD::Graph GD::Text GD FCGI::ProcManager FCGI DateTime CGI::Emulate::PSGI Text::Quoted Regexp::IPv6 Encode Crypt::Eksblowfish CSS::Squish DateTime::Locale CGI::PSGI Module::Versions::Report Apache::Session Date::Extract HTML::Mason::PSGIHandler MIME::Entity List::MoreUtils DBI Locale::Maketext::Lexicon Devel::StackTrace Module::Refresh Role::Basic HTTP::Message Text::Password::Pronounceable Devel::GlobalDestruction Time::ParseDate Date::Manip HTML::RewriteAttributes Tree::Simple Text::Template HTML::Scrubber HTML::Quoted Text::WikiFormat XML::RSS DBIx::SearchBuilder Data::GUID Mail::Mailer File::ShareDir Regexp::Common HTML::Mason HTML::Entities LWP::Simple Symbol::Global::Name HTML::FormatText::WithLinks DateTime::Format::Natural Plack Mail::Header Class::Accessor Locale::Maketext::Fuzzy Email::Address::List Text::Wrapper Regexp::Common::net::CIDR HTML::FormatText::WithLinks::AndTables Log::Dispatch Net::CIDR JSON UNIVERSAL::require Email::Address Plack::Handler::Starlet
did I say one or two? okay I lied, lots...

here is one way to install a SINGLE one of those that bypasses to need to do self testing...
Quote:
perl -MCPAN -e "CPAN::Shell->notest('install', 'Plack::Handler::Starlet')"
fortunately some idiot already downloaded/tested all the ones we need...
You can also limit the above list by removing inessential thing like Graphviz etc... (I did this)

Quote:
If the script reports any missing dependencies, install them by
hand, or run the following command as a user who has permission to
install perl modules on your system:
make fixdeps

(I did it by hand, meh)

don't shove that on the kindle just yet.


[SNIP ADD THE CONFIGURING postgresql HERE ]

We need to configure RT like this:

rt-4.2.0
Quote:
CFLAGS="-O2 -march=armv6j -mtune=arm1136jf-s -mfpu=vfp -pipe -fomit-frame-pointer -fno-stack-protector -U_FORTIFY_SOURCE" CXXFLAGS=${CFLAGS} LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-rpath,/mnt/us/extensions/rt/usr/lib" ./configure --prefix=/mnt/us/extensions/rt/usr --with-my-user-group --with-db-dba=root --with-db-port=5432 --with-web-handler=fastcgi,standalone,modperl2 --with-db-type=Pg
[SNIP ADD THE CONFIGURING AND BUILDING RT HERE ]

and then a couple of extra commands pointed at our postgresql database server
[Add details about that.]



Okay let's test out our RT fast-cgi module
[root@kindle root]# LD_LIBRARY_PATH=/mnt/us/extensions/postgresql/usr/lib/:$LD_LIBRARY_PATH /mnt/us/extensions/lighttpd/usr/bin/spawn-fcgi -p 127.0.0.1 -p 9000 -f /mnt/us/extensions/rt/usr/sbin/rt-server.fcgi
Quote:
spawn-fcgi.c.197: child spawned successfully: PID: 26985
[root@kindle root]# FastCGI: manager (pid 26985): initialized
FastCGI: server (pid 26990): initialized
FastCGI: manager (pid 26985): server (pid 26990) started
seems to work

[SNIP ADD THE CONFIGURING nginx HERE ]

TBC:



[JUMP TO STARTING THE DATABASE]

[root@kindle bin]# /mnt/us/extensions/postgresql/usr/bin/postgres -D /mnt/us/extensions/postgresql/data/rt
Quote:
"root" execution of the PostgreSQL server is not permitted.
But this is a kindle so... yeah...
The server WILL be started as a privileged user ID
obviously this could lead to possible system security compromise.
but we don't have much choice so... dont go running your business from this :P
YOU HAVE BEEN WARNED :D.

LOG: could not create IPv6 socket: Address family not supported by protocol
LOG: database system was shut down at 2013-11-16 23:55:15 GMT
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
so that's working...

Now the DOCS say we can WITHOUT running nginx use the invocation:
[root@kindle root]# LD_LIBRARY_PATH=/mnt/us/extensions/postgresql/usr/lib/:$LD_LIBRARY_PATH /mnt/us/extensions/rt/usr/sbin/rt-server

and browse the thing, however doing so will top out the memory required to above 240 MB and the kindle will reboot...

So... not an option.

Last edited by twobob; 11-16-2013 at 10:07 PM.
twobob is offline   Reply With Quote
Advert
Old 11-16-2013, 09:40 PM   #3
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
This somehow seems an appropriate comment:



@twobob: Go ahead and moderate this one into the bit-bucket if you wish.
knc1 is offline   Reply With Quote
Old 11-16-2013, 10:36 PM   #4
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Just for giggles. I slapped on a 100MB swapfile and ran the native server.

Worked great. not super fast but totally usable.

I'll finish up documenting fast-cgi and such later.

but yeah. P.O.C. works. probably run real nice on a PW.
Attached Thumbnails
Click image for larger version

Name:	screen_shot-18333.gif
Views:	821
Size:	17.6 KB
ID:	115304   Click image for larger version

Name:	screen_shot-18334.gif
Views:	771
Size:	20.6 KB
ID:	115305   Click image for larger version

Name:	screen_shot-18335.gif
Views:	746
Size:	21.3 KB
ID:	115306   Click image for larger version

Name:	screen_shot-18336.gif
Views:	777
Size:	21.3 KB
ID:	115307  

Last edited by twobob; 11-16-2013 at 10:46 PM.
twobob is offline   Reply With Quote
Old 11-16-2013, 10:39 PM   #5
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Looks better than expected for certain.
Even in grayscale.

A note for the general readers:
The nginx server can be used as a proxy server, for those trying to re-direct attempts to access the Amazon system URLs.

A note for the technical readers:
Here "swap on flash" is being used - the Kindle just does not have the free RAM available to do this sort of applications set without it.

Last edited by knc1; 11-17-2013 at 07:35 AM.
knc1 is offline   Reply With Quote
Advert
Old 11-17-2013, 07:44 PM   #6
brianinmaine
Evangelist
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 457
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
I saw recently that you were building web server stuff, why am I not surprised that this all works?
The other day I was going to try lighttpd but it complained I didn't have an sql installed yet, so I put it off. Maybe I'll go back and revist. Not that I need any of this, just fun to get working. I would like, as a package, lighttpd, php, and postgresql. Nice combo IMO. Some cool scripts could be served up with that... Thanks for the inspiration!

As a side note, I was just using this python script to serve /mnt/us as an index and allow files to be uploaded, one at a time. Handy for quickly sharing with a friend, yes?
Needs python : https://www.mobileread.com/forums/sho...ghlight=python

Thanks again!
Attached Files
File Type: zip www.zip (5.7 KB, 562 views)
brianinmaine is offline   Reply With Quote
Old 11-17-2013, 08:34 PM   #7
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by brianinmaine View Post
....
The other day I was going to try lighttpd but it complained I didn't have an sql installed yet, so I put it off. Maybe I'll go back and revist. .....

Thanks again!
Expects to live in /mnt/us/extensions/lighttpd ( I was lazy and didn't pack it up like that) Haven't really played with this, just used it to test fast-cgi.
Attached Files
File Type: zip lighttpd.zip (421.6 KB, 585 views)
twobob is offline   Reply With Quote
Old 11-17-2013, 10:27 PM   #8
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
okay so.. after a very large amount of messing around thinking I just couldn't get the sockets working for fast-cgi turns out it wasnt me: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698071 DUH!

Now have fast-cgi sockets working properly on the k3. Yay.

[root@kindle root]# LD_LIBRARY_PATH=/mnt/us/extensions/postgresql/usr/lib/:$LD_LIBRARY_PATH /mnt/us/extensions/lighttpd/usr/bin/spawn-fcgi -s /var/run/fcgiwrap.socket -f /mnt/us/extensions/rt/usr/sbin/rt-server.fcgi
Quote:
spawn-fcgi.c.197: child spawned successfully: PID: 26457
[root@kindle root]# FastCGI: manager (pid 26457): initialized
FastCGI: manager (pid 26457): server (pid 26469) started
FastCGI: server (pid 26469): initialized
That looks to be running about 60Mb cheaper. so should now be in our memory price range. Happy days.

Last edited by twobob; 11-17-2013 at 10:41 PM.
twobob is offline   Reply With Quote
Old 11-17-2013, 11:16 PM   #9
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by brianinmaine View Post
The other day I was going to try lighttpd but it complained I didn't have an sql installed yet, so I put it off. Maybe I'll go back and revist. Not that I need any of this, just fun to get working. I would like, as a package, lighttpd, php, and postgresql. Nice combo IMO. Some cool scripts could be served up with that... Thanks for the inspiration!
Another lightweight full-featured server (with PHP support) is uWSGI. It does support Perl (PSGI) also...
eureka is offline   Reply With Quote
Old 11-17-2013, 11:57 PM   #10
brianinmaine
Evangelist
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 457
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
Quote:
Originally Posted by eureka View Post
Another lightweight full-featured server (with PHP support) is uWSGI. It does support Perl (PSGI) also...
That looks quite different than I am used to... I KNOW I don't understand most of the info on the landing page!

twobob - thanks for the lighttpd package - now to test then add php, then...

yep - with your previous php post, I just got phpinfo ! On my way now

Last edited by brianinmaine; 11-18-2013 at 01:19 AM.
brianinmaine is offline   Reply With Quote
Old 11-18-2013, 08:41 AM   #11
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Post

Quote:
Originally Posted by eureka View Post
Another lightweight full-featured server (with PHP support) is uWSGI. It does support Perl (PSGI) also...
Quote:
################# uWSGI configuration

pcre = True
kernel = Linux
malloc = libc
execinfo = False
ifaddrs = True
ssl = True
zlib = True
locking = pthread_mutex
plugin_dir = .
timer = timerfd
yaml = True
json = False
filemonitor = inotify
routing = True
debug = False
zeromq = False
capabilities = False
xml = libxml2
event = epoll
I bundled a perl it should work with and amended the build script to run -Wno-error as it fails OOTB.

because:
Quote:
core/event.c: In function ‘timerfd_settime’:
core/event.c:1245: warning: control reaches end of non-void function

Spoiler:
Code:
[root@kindle root]# /mnt/us/extensions/uwsgi//uwsgi --help
/mnt/us/extensions/uwsgi//uwsgi: /usr/lib/libz.so.1: no version information available (required by /mnt/us/extensions/uwsgi//uwsgi)
Usage: /mnt/us/extensions/uwsgi/uwsgi [options...]
    -s|--socket                            bind to the specified UNIX/TCP socket using default protocol
    -s|--uwsgi-socket                      bind to the specified UNIX/TCP socket using uwsgi protocol
    -s|--suwsgi-socket                     bind to the specified UNIX/TCP socket using uwsgi protocol over SSL
    -s|--ssl-socket                        bind to the specified UNIX/TCP socket using uwsgi protocol over SSL
    --http-socket                          bind to the specified UNIX/TCP socket using HTTP protocol
    --http-socket-modifier1                force the specified modifier1 when using HTTP protocol
    --http-socket-modifier2                force the specified modifier2 when using HTTP protocol
    --https-socket                         bind to the specified UNIX/TCP socket using HTTPS protocol
    --https-socket-modifier1               force the specified modifier1 when using HTTPS protocol
    --https-socket-modifier2               force the specified modifier2 when using HTTPS protocol
    --fastcgi-socket                       bind to the specified UNIX/TCP socket using FastCGI protocol
    --fastcgi-nph-socket                   bind to the specified UNIX/TCP socket using FastCGI protocol (nph mode)
    --fastcgi-modifier1                    force the specified modifier1 when using FastCGI protocol
    --fastcgi-modifier2                    force the specified modifier2 when using FastCGI protocol
    --scgi-socket                          bind to the specified UNIX/TCP socket using SCGI protocol
    --scgi-nph-socket                      bind to the specified UNIX/TCP socket using SCGI protocol (nph mode)
    --scgi-modifier1                       force the specified modifier1 when using SCGI protocol
    --scgi-modifier2                       force the specified modifier2 when using SCGI protocol
    --raw-socket                           bind to the specified UNIX/TCP socket using RAW protocol
    --raw-modifier1                        force the specified modifier1 when using RAW protocol
    --raw-modifier2                        force the specified modifier2 when using RAW protocol
    --puwsgi-socket                        bind to the specified UNIX/TCP socket using persistent uwsgi protocol (puwsgi)
    --protocol                             force the specified protocol for default sockets
    --socket-protocol                      force the specified protocol for default sockets
    --shared-socket                        create a shared sacket for advanced jailing or ipc
    --undeferred-shared-socket             create a shared sacket for advanced jailing or ipc (undeferred mode)
    -p|--processes                         spawn the specified number of workers/processes
    -p|--workers                           spawn the specified number of workers/processes
    --thunder-lock                         serialize accept() usage (if possible)
    -t|--harakiri                          set harakiri timeout
    --harakiri-verbose                     enable verbose mode for harakiri
    --harakiri-no-arh                      do not enable harakiri during after-request-hook
    --no-harakiri-arh                      do not enable harakiri during after-request-hook
    --no-harakiri-after-req-hook           do not enable harakiri during after-request-hook
    --backtrace-depth                      set backtrace depth
    --mule-harakiri                        set harakiri timeout for mule tasks
    -x|--xmlconfig                         load config from xml file
    -x|--xml                               load config from xml file
    --config                               load configuration using the pluggable system
    --fallback-config                      re-exec uwsgi with the specified config when exit code is 1
    --strict                               enable strict mode (placeholder cannot be used)
    --skip-zero                            skip check of file descriptor 0
    --skip-atexit                          skip atexit hooks (ignored by the master)
    -S|--set                               set a placeholder or an option
    --set-placeholder                      set a placeholder
    --set-ph                               set a placeholder
    --get                                  print the specified option value and exit
    --declare-option                       declare a new uWSGI custom option
    --for                                  (opt logic) for cycle
    --for-glob                             (opt logic) for cycle (expand glob)
    --for-times                            (opt logic) for cycle (expand the specified num to a list starting from 1)
    --endfor                               (opt logic) end for cycle
    --end-for                              (opt logic) end for cycle
    --if-opt                               (opt logic) check for option
    --if-not-opt                           (opt logic) check for option
    --if-env                               (opt logic) check for environment variable
    --if-not-env                           (opt logic) check for environment variable
    --ifenv                                (opt logic) check for environment variable
    --if-reload                            (opt logic) check for reload
    --if-not-reload                        (opt logic) check for reload
    --if-exists                            (opt logic) check for file/directory existance
    --if-not-exists                        (opt logic) check for file/directory existance
    --ifexists                             (opt logic) check for file/directory existance
    --if-plugin                            (opt logic) check for plugin
    --if-not-plugin                        (opt logic) check for plugin
    --ifplugin                             (opt logic) check for plugin
    --if-file                              (opt logic) check for file existance
    --if-not-file                          (opt logic) check for file existance
    --if-dir                               (opt logic) check for directory existance
    --if-not-dir                           (opt logic) check for directory existance
    --ifdir                                (opt logic) check for directory existance
    --if-directory                         (opt logic) check for directory existance
    --endif                                (opt logic) end if
    --end-if                               (opt logic) end if
    --blacklist                            set options blacklist context
    --end-blacklist                        clear options blacklist context
    --whitelist                            set options whitelist context
    --end-whitelist                        clear options whitelist context
    --ignore-sigpipe                       do not report (annoying) SIGPIPE
    --ignore-write-errors                  do not report (annoying) write()/writev() errors
    --write-errors-tolerance               set the maximum number of allowed write errors (default: no tolerance)
    --write-errors-exception-only          only raise an exception on write errors giving control to the app itself
    --disable-write-exception              disable exception generation on write()/writev()
    --inherit                              use the specified file as config template
    --include                              include the specified file as immediate configuration
    -d|--daemonize                         daemonize uWSGI
    --daemonize2                           daemonize uWSGI after app loading
    --stop                                 stop an instance
    --reload                               reload an instance
    --pause                                pause an instance
    --suspend                              suspend an instance
    --resume                               resume an instance
    --connect-and-read                     connect to a socket and wait for data from it
    --extract                              fetch/dump any supported address to stdout
    -l|--listen                            set the socket listen queue size
    -v|--max-vars                          set the amount of internal iovec/vars structures
    --max-apps                             set the maximum number of per-worker applications
    -b|--buffer-size                       set internal buffer size
    -m|--memory-report                     enable memory report
    --profiler                             enable the specified profiler
    -c|--cgi-mode                          force CGI-mode for plugins supporting it
    -a|--abstract-socket                   force UNIX socket in abstract mode (Linux only)
    -C|--chmod-socket                      chmod-socket
    -C|--chmod                             chmod-socket
    --chown-socket                         chown unix sockets
    --umask                                set umask
    --freebind                             put socket in freebind mode
    --map-socket                           map sockets to specific workers
    -T|--enable-threads                    enable threads
    --no-threads-wait                      do not wait for threads cancellation on quit/reload
    --auto-procname                        automatically set processes name to something meaningful
    --procname-prefix                      add a prefix to the process names
    --procname-prefix-spaced               add a spaced prefix to the process names
    --procname-append                      append a string to process names
    --procname                             set process names
    --procname-master                      set master process name
    -i|--single-interpreter                do not use multiple interpreters (where available)
    --need-app                             exit if no app can be loaded
    -M|--master                            enable master process
    --honour-stdin                         do not remap stdin to /dev/null
    --emperor                              run the Emperor
    --emperor-proxy-socket                 force the vassal to became an Emperor proxy
    --emperor-wrapper                      set a binary wrapper for vassals
    --emperor-nofollow                     do not follow symlinks when checking for mtime
    --emperor-procname                     set the Emperor process name
    --emperor-freq                         set the Emperor scan frequency (default 3 seconds)
    --emperor-required-heartbeat           set the Emperor tolerance about heartbeats
    --emperor-curse-tolerance              set the Emperor tolerance about cursed vassals
    --emperor-pidfile                      write the Emperor pid in the specified file
    --emperor-tyrant                       put the Emperor in Tyrant mode
    --emperor-tyrant-nofollow              do not follow symlinks when checking for uid/gid in Tyrant mode
    --emperor-stats                        run the Emperor stats server
    --emperor-stats-server                 run the Emperor stats server
    --early-emperor                        spawn the emperor as soon as possibile
    --emperor-broodlord                    run the emperor in BroodLord mode
    --emperor-throttle                     set throttling level (in milliseconds) for bad behaving vassals (default 1000)
    --emperor-max-throttle                 set max throttling level (in milliseconds) for bad behaving vassals (default 3 minutes)
    --emperor-magic-exec                   prefix vassals config files with exec:// if they have the executable bit
    --emperor-on-demand-extension          search for text file (vassal name + extension) containing the on demand socket name
    --emperor-on-demand-ext                search for text file (vassal name + extension) containing the on demand socket name
    --emperor-on-demand-directory          enable on demand mode binding to the unix socket in the specified directory named like the vassal + .socket
    --emperor-on-demand-dir                enable on demand mode binding to the unix socket in the specified directory named like the vassal + .socket
    --emperor-on-demand-exec               use the output of the specified command as on demand socket name (the vassal name is passed as the only argument)
    --emperor-extra-extension              allows the specified extension in the Emperor (vassal will be called with --config)
    --emperor-extra-ext                    allows the specified extension in the Emperor (vassal will be called with --config)
    --emperor-use-clone                    use clone() instead of fork() passing the specified unshare() flags
    --imperial-monitor-list                list enabled imperial monitors
    --imperial-monitors-list               list enabled imperial monitors
    --vassals-inherit                      add config templates to vassals config (uses --inherit)
    --vassals-include                      include config templates to vassals config (uses --include instead of --inherit)
    --vassals-inherit-before               add config templates to vassals config (uses --inherit, parses before the vassal file)
    --vassals-include-before               include config templates to vassals config (uses --include instead of --inherit, parses before the vassal file)
    --vassals-start-hook                   run the specified command before each vassal starts
    --vassals-stop-hook                    run the specified command after vassal's death
    --vassal-sos-backlog                   ask emperor for sos if backlog queue has more items than the value specified
    --vassals-set                          automatically set the specified option (via --set) for every vassal
    --vassal-set                           automatically set the specified option (via --set) for every vassal
    --heartbeat                            announce healthiness to the emperor
    --reload-mercy                         set the maximum time (in seconds) we wait for workers and other processes to die during reload/shutdown
    --worker-reload-mercy                  set the maximum time (in seconds) a worker can take to reload/shutdown (default is 60)
    --exit-on-reload                       force exit even if a reload is requested
    --die-on-term                          exit instead of brutal reload on SIGTERM
    --force-gateway                        force the spawn of the first registered gateway without a master
    -h|--help                              show this help
    -h|--usage                             show this help
    --print-sym                            print content of the specified binary symbol
    --print-symbol                         print content of the specified binary symbol
    -r|--reaper                            call waitpid(-1,...) after each request to get rid of zombies
    -R|--max-requests                      reload workers after the specified amount of managed requests
    --min-worker-lifetime                  number of seconds worker must run before being reloaded (default is 60)
    --max-worker-lifetime                  reload workers after the specified amount of seconds (default is disabled)
    -z|--socket-timeout                    set internal sockets timeout
    --no-fd-passing                        disable file descriptor passing
    --locks                                create the specified number of shared locks
    --lock-engine                          set the lock engine
    --ftok                                 set the ipcsem key via ftok() for avoiding duplicates
    --persistent-ipcsem                    do not remove ipcsem's on shutdown
    -A|--sharedarea                        create a raw shared memory area of specified pages
    --safe-fd                              do not close the specified file descriptor
    --fd-safe                              do not close the specified file descriptor
    --cache                                create a shared cache containing given elements
    --cache-blocksize                      set cache blocksize
    --cache-store                          enable persistent cache to disk
    --cache-store-sync                     set frequency of sync for persistent cache
    --cache-no-expire                      disable auto sweep of expired items
    --cache-expire-freq                    set the frequency of cache sweeper scans (default 3 seconds)
    --cache-report-freed-items             constantly report the cache item freed by the sweeper (use only for debug)
    --cache-udp-server                     bind the cache udp server (used only for set/update/delete) to the specified socket
    --cache-udp-node                       send cache update/deletion to the specified cache udp server
    --cache-sync                           copy the whole content of another uWSGI cache server on server startup
    --cache-use-last-modified              update last_modified_at timestamp on every cache item modification (default is disabled)
    --add-cache-item                       add an item in the cache
    --load-file-in-cache                   load a static file in the cache
    --load-file-in-cache-gzip              load a static file in the cache with gzip compression
    --cache2                               create a new generation shared cache (keyval syntax)
    --queue                                enable shared queue
    --queue-blocksize                      set queue blocksize
    --queue-store                          enable persistent queue to disk
    --queue-store-sync                     set frequency of sync for persistent queue
    -Q|--spooler                           run a spooler on the specified directory
    --spooler-external                     map spoolers requests to a spooler directory managed by an external instance
    --spooler-ordered                      try to order the execution of spooler tasks
    --spooler-chdir                        chdir() to specified directory before each spooler task
    --spooler-processes                    set the number of processes for spoolers
    --spooler-quiet                        do not be verbose with spooler tasks
    --spooler-max-tasks                    set the maximum number of tasks to run before recycling a spooler
    --spooler-harakiri                     set harakiri timeout for spooler tasks
    --mule                                 add a mule
    --mules                                add the specified number of mules
    --farm                                 add a mule farm
    --mule-msg-size                        set mule message buffer size
    --signal                               send a uwsgi signal to a server
    --signal-bufsize                       set buffer size for signal queue
    --signals-bufsize                      set buffer size for signal queue
    --signal-timer                         add a timer (syntax: <signal> <seconds>)
    --timer                                add a timer (syntax: <signal> <seconds>)
    --signal-rbtimer                       add a redblack timer (syntax: <signal> <seconds>)
    --rbtimer                              add a redblack timer (syntax: <signal> <seconds>)
    --rpc-max                              maximum number of rpc slots (default: 64)
    -L|--disable-logging                   disable request logging
    --flock                                lock the specified file before starting, exit if locked
    --flock-wait                           lock the specified file before starting, wait if locked
    --flock2                               lock the specified file after logging/daemon setup, exit if locked
    --flock-wait2                          lock the specified file after logging/daemon setup, wait if locked
    --pidfile                              create pidfile (before privileges drop)
    --pidfile2                             create pidfile (after privileges drop)
    --chroot                               chroot() to the specified directory
    --pivot-root                           pivot_root() to the specified directories (new_root and put_old must be separated with a space)
    --pivot_root                           pivot_root() to the specified directories (new_root and put_old must be separated with a space)
    --uid                                  setuid to the specified user/uid
    --gid                                  setgid to the specified group/gid
    --add-gid                              add the specified group id to the process credentials
    --immediate-uid                        setuid to the specified user/uid IMMEDIATELY
    --immediate-gid                        setgid to the specified group/gid IMMEDIATELY
    --no-initgroups                        disable additional groups set via initgroups()
    --unshare                              unshare() part of the processes and put it in a new namespace
    --unshare2                             unshare() part of the processes and put it in a new namespace after rootfs change
    --refork                               fork() again after privileges drop. Useful for jailing systems
    --re-fork                              fork() again after privileges drop. Useful for jailing systems
    --refork-as-root                       fork() again before privileges drop. Useful for jailing systems
    --re-fork-as-root                      fork() again before privileges drop. Useful for jailing systems
    --refork-post-jail                     fork() again after jailing. Useful for jailing systems
    --re-fork-post-jail                    fork() again after jailing. Useful for jailing systems
    --hook-asap                            run the specified hook as soon as possible
    --hook-pre-jail                        run the specified hook before jailing
    --hook-post-jail                       run the specified hook after jailing
    --hook-in-jail                         run the specified hook in jail after initialization
    --hook-as-root                         run the specified hook before privileges drop
    --hook-as-user                         run the specified hook after privileges drop
    --hook-as-user-atexit                  run the specified hook before app exit and reload
    --hook-pre-app                         run the specified hook before app loading
    --hook-post-app                        run the specified hook after app loading
    --hook-as-vassal                       run the specified command before exec()ing the vassal
    --hook-as-emperor                      run the specified command in the emperor after the vassal has been started
    --exec-asap                            run the specified command as soon as possible
    --exec-pre-jail                        run the specified command before jailing
    --exec-post-jail                       run the specified command after jailing
    --exec-in-jail                         run the specified command in jail after initialization
    --exec-as-root                         run the specified command before privileges drop
    --exec-as-user                         run the specified command after privileges drop
    --exec-as-user-atexit                  run the specified command before app exit and reload
    --exec-pre-app                         run the specified command before app loading
    --exec-post-app                        run the specified command after app loading
    --exec-as-vassal                       run the specified command before exec()ing the vassal
    --exec-as-emperor                      run the specified command in the emperor after the vassal has been started
    --mount-asap                           mount filesystem as soon as possible
    --mount-pre-jail                       mount filesystem before jailing
    --mount-post-jail                      mount filesystem after jailing
    --mount-in-jail                        mount filesystem in jail after initialization
    --mount-as-root                        mount filesystem before privileges drop
    --mount-as-vassal                      mount filesystem before exec()ing the vassal
    --mount-as-emperor                     mount filesystem in the emperor after the vassal has been started
    --umount-asap                          unmount filesystem as soon as possible
    --umount-pre-jail                      unmount filesystem before jailing
    --umount-post-jail                     unmount filesystem after jailing
    --umount-in-jail                       unmount filesystem in jail after initialization
    --umount-as-root                       unmount filesystem before privileges drop
    --umount-as-vassal                     unmount filesystem before exec()ing the vassal
    --umount-as-emperor                    unmount filesystem in the emperor after the vassal has been started
    --wait-for-interface                   wait for the specified network interface to come up before running root hooks
    --wait-for-interface-timeout           set the timeout for wait-for-interface
    --wait-interface                       wait for the specified network interface to come up before running root hooks
    --wait-interface-timeout               set the timeout for wait-for-interface
    --wait-for-iface                       wait for the specified network interface to come up before running root hooks
    --wait-for-iface-timeout               set the timeout for wait-for-interface
    --wait-iface                           wait for the specified network interface to come up before running root hooks
    --wait-iface-timeout                   set the timeout for wait-for-interface
    --call-asap                            call the specified function as soon as possible
    --call-pre-jail                        call the specified function before jailing
    --call-post-jail                       call the specified function after jailing
    --call-in-jail                         call the specified function in jail after initialization
    --call-as-root                         call the specified function before privileges drop
    --call-as-user                         call the specified function after privileges drop
    --call-as-user-atexit                  call the specified function before app exit and reload
    --call-pre-app                         call the specified function before app loading
    --call-post-app                        call the specified function after app loading
    --call-as-vassal                       call the specified function() before exec()ing the vassal
    --call-as-vassal1                      call the specified function(char *) before exec()ing the vassal
    --call-as-vassal3                      call the specified function(char *, uid_t, gid_t) before exec()ing the vassal
    --call-as-emperor                      call the specified function() in the emperor after the vassal has been started
    --call-as-emperor1                     call the specified function(char *) in the emperor after the vassal has been started
    --call-as-emperor2                     call the specified function(char *, pid_t) in the emperor after the vassal has been started
    --call-as-emperor4                     call the specified function(char *, pid_t, uid_t, gid_t) in the emperor after the vassal has been started
    --ini                                  load config from ini file
    -y|--yaml                              load config from yaml file
    -y|--yml                               load config from yaml file
    --weight                               weight of the instance (used by clustering/lb/subscriptions)
    --auto-weight                          set weight of the instance (used by clustering/lb/subscriptions) automatically
    --no-server                            force no-server mode
    --command-mode                         force command mode
    --no-defer-accept                      disable deferred-accept on sockets
    --tcp-nodelay                          enable TCP NODELAY on each request
    --so-keepalive                         enable TCP KEEPALIVEs
    --so-send-timeout                      set SO_SNDTIMEO
    --socket-send-timeout                  set SO_SNDTIMEO
    --so-write-timeout                     set SO_SNDTIMEO
    --socket-write-timeout                 set SO_SNDTIMEO
    --socket-sndbuf                        set SO_SNDBUF
    --socket-rcvbuf                        set SO_RCVBUF
    --limit-as                             limit processes address space/vsz
    --limit-nproc                          limit the number of spawnable processes
    --reload-on-as                         reload if address space is higher than specified megabytes
    --reload-on-rss                        reload if rss memory is higher than specified megabytes
    --evil-reload-on-as                    force the master to reload a worker if its address space is higher than specified megabytes
    --evil-reload-on-rss                   force the master to reload a worker if its rss memory is higher than specified megabytes
    --reload-on-fd                         reload if the specified file descriptor is ready
    --brutal-reload-on-fd                  brutal reload if the specified file descriptor is ready
    --pcre-jit                             enable pcre jit (if available)
    --never-swap                           lock all memory pages avoiding swapping
    --touch-reload                         reload uWSGI if the specified file is modified/touched
    --touch-workers-reload                 trigger reload of (only) workers if the specified file is modified/touched
    --touch-chain-reload                   trigger chain reload if the specified file is modified/touched
    --touch-logrotate                      trigger logrotation if the specified file is modified/touched
    --touch-logreopen                      trigger log reopen if the specified file is modified/touched
    --touch-exec                           run command when the specified file is modified/touched (syntax: file command)
    --touch-signal                         signal when the specified file is modified/touched (syntax: file signal)
    --fs-reload                            graceful reload when the specified filesystem object is modified
    --fs-brutal-reload                     brutal reload when the specified filesystem object is modified
    --fs-signal                            raise a uwsgi signal when the specified filesystem object is modified (syntax: file signal)
    --check-mountpoint                     destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)
    --mountpoint-check                     destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)
    --check-mount                          destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)
    --mount-check                          destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)
    --propagate-touch                      over-engineering option for system with flaky signal management
    --limit-post                           limit request body
    --no-orphans                           automatically kill workers if master dies (can be dangerous for availability)
    --prio                                 set processes/threads priority
    --cpu-affinity                         set cpu affinity
    --post-buffering                       enable post buffering
    --post-buffering-bufsize               set buffer size for read() in post buffering mode
    --body-read-warning                    set the amount of allowed memory allocation (in megabytes) for request body before starting printing a warning
    --upload-progress                      enable creation of .json files in the specified directory during a file upload
    --no-default-app                       do not fallback to default app
    --manage-script-name                   automatically rewrite SCRIPT_NAME and PATH_INFO
    --ignore-script-name                   ignore SCRIPT_NAME
    --catch-exceptions                     report exception as http output (discouraged, use only for testing)
    --reload-on-exception                  reload a worker when an exception is raised
    --reload-on-exception-type             reload a worker when a specific exception type is raised
    --reload-on-exception-value            reload a worker when a specific exception value is raised
    --reload-on-exception-repr             reload a worker when a specific exception type+value (language-specific) is raised
    --exception-handler                    add an exception handler
    --enable-metrics                       enable metrics subsystem
    --metric                               add a custom metric
    --metric-threshold                     add a metric threshold/alarm
    --metric-alarm                         add a metric threshold/alarm
    --metrics-dir                          export metrics as text files to the specified directory
    --metrics-dir-restore                  restore last value taken from the metrics dir
    --metric-dir                           export metrics as text files to the specified directory
    --metric-dir-restore                   restore last value taken from the metrics dir
    --udp                                  run the udp server on the specified address
    --stats                                enable the stats server on the specified address
    --stats-server                         enable the stats server on the specified address
    --stats-http                           prefix stats server json output with http headers
    --stats-minified                       minify statistics json output
    --stats-min                            minify statistics json output
    --stats-push                           push the stats json to the specified destination
    --stats-pusher-default-freq            set the default frequency of stats pushers
    --stats-pushers-default-freq           set the default frequency of stats pushers
    --multicast                            subscribe to specified multicast group
    --multicast-ttl                        set multicast ttl
    --multicast-loop                       set multicast loop (default 1)
    --master-fifo                          enable the master fifo
    --legion                               became a member of a legion
    --legion-mcast                         became a member of a legion (shortcut for multicast)
    --legion-node                          add a node to a legion
    --legion-freq                          set the frequency of legion packets
    --legion-tolerance                     set the tolerance of legion subsystem
    --legion-skew-tolerance                set the clock skew tolerance of legion subsystem (default 30 seconds)
    --legion-lord                          action to call on Lord election
    --legion-unlord                        action to call on Lord dismiss
    --legion-setup                         action to call on legion setup
    --legion-death                         action to call on legion death (shutdown of the instance)
    --legion-join                          action to call on legion join (first time quorum is reached)
    --legion-node-joined                   action to call on new node joining legion
    --legion-node-left                     action to call node leaving legion
    --legion-quorum                        set the quorum of a legion
    --legion-scroll                        set the scroll of a legion
    --legion-scroll-max-size               set max size of legion scroll buffer
    --legion-scroll-list-max-size          set max size of legion scroll list buffer
    --subscriptions-sign-check             set digest algorithm and certificate directory for secured subscription system
    --subscriptions-sign-check-tolerance   set the maximum tolerance (in seconds) of clock skew for secured subscription system
    --subscription-algo                    set load balancing algorithm for the subscription system
    --subscription-dotsplit                try to fallback to the next part (dot based) in subscription key
    --subscribe-to                         subscribe to the specified subscription server
    --st                                   subscribe to the specified subscription server
    --subscribe                            subscribe to the specified subscription server
    --subscribe2                           subscribe to the specified subscription server using advanced keyval syntax
    --subscribe-freq                       send subscription announce at the specified interval
    --subscription-tolerance               set tolerance for subscription servers
    --unsubscribe-on-graceful-reload       force unsubscribe request even during graceful reload
    --snmp                                 enable the embedded snmp server
    --snmp-community                       set the snmp community string
    --ssl-verbose                          be verbose about SSL errors
    --ssl-sessions-use-cache               use uWSGI cache for ssl sessions storage
    --ssl-session-use-cache                use uWSGI cache for ssl sessions storage
    --ssl-sessions-timeout                 set SSL sessions timeout (default: 300 seconds)
    --ssl-session-timeout                  set SSL sessions timeout (default: 300 seconds)
    --sni                                  add an SNI-governed SSL context
    --sni-dir                              check for cert/key/client_ca file in the specified directory and create a sni/ssl context on demand
    --sni-dir-ciphers                      set ssl ciphers for sni-dir option
    --sni-regexp                           add an SNI-governed SSL context (the key is a regexp)
    --check-interval                       set the interval (in seconds) of master checks
    --forkbomb-delay                       sleep for the specified number of seconds when a forkbomb is detected
    --binary-path                          force binary path
    --privileged-binary-patch              patch the uwsgi binary with a new command (before privileges drop)
    --unprivileged-binary-patch            patch the uwsgi binary with a new command (after privileges drop)
    --privileged-binary-patch-arg          patch the uwsgi binary with a new command and arguments (before privileges drop)
    --unprivileged-binary-patch-arg        patch the uwsgi binary with a new command and arguments (after privileges drop)
    --async                                enable async mode with specified cores
    --max-fd                               set maximum number of file descriptors (requires root privileges)
    --logto                                set logfile/udp address
    --logto2                               log to specified file or udp address after privileges drop
    --log-format                           set advanced format for request logging
    --logformat                            set advanced format for request logging
    --logformat-strftime                   apply strftime to logformat output
    --log-format-strftime                  apply strftime to logformat output
    --logfile-chown                        chown logfiles
    --logfile-chmod                        chmod logfiles
    --log-syslog                           log to syslog
    --log-socket                           send logs to the specified socket
    --req-logger                           set/append a request logger
    --logger-req                           set/append a request logger
    --logger                               set/append a logger
    --logger-list                          list enabled loggers
    --loggers-list                         list enabled loggers
    --threaded-logger                      offload log writing to a thread
    --log-encoder                          add an item in the log encoder chain
    --log-req-encoder                      add an item in the log req encoder chain
    --log-drain                            drain (do not show) log lines matching the specified regexp
    --log-filter                           show only log lines matching the specified regexp
    --log-route                            log to the specified named logger if regexp applied on logline matches
    --log-req-route                        log requests to the specified named logger if regexp applied on logline matches
    --use-abort                            call abort() on segfault/fpe, could be useful for generating a core dump
    --alarm                                create a new alarm, syntax: <alarm> <plugin:args>
    --alarm-freq                           tune the anti-loop alam system (default 3 seconds)
    --alarm-fd                             raise the specified alarm when an fd is read for read (by default it reads 1 byte, set 8 for eventfd)
    --alarm-segfault                       raise the specified alarm when the segmentation fault handler is executed
    --segfault-alarm                       raise the specified alarm when the segmentation fault handler is executed
    --log-alarm                            raise the specified alarm when a log line matches the specified regexp, syntax: <alarm>[,alarm...] <regexp>
    --alarm-log                            raise the specified alarm when a log line matches the specified regexp, syntax: <alarm>[,alarm...] <regexp>
    --not-log-alarm                        skip the specified alarm when a log line matches the specified regexp, syntax: <alarm>[,alarm...] <regexp>
    --not-alarm-log                        skip the specified alarm when a log line matches the specified regexp, syntax: <alarm>[,alarm...] <regexp>
    --alarm-list                           list enabled alarms
    --alarms-list                          list enabled alarms
    --alarm-msg-size                       set the max size of an alarm message (default 8192)
    --log-master                           delegate logging to master process
    --log-master-bufsize                   set the buffer size for the master logger. bigger log messages will be truncated
    --log-master-stream                    create the master logpipe as SOCK_STREAM
    --log-master-req-stream                create the master requests logpipe as SOCK_STREAM
    --log-reopen                           reopen log after reload
    --log-truncate                         truncate log on startup
    --log-maxsize                          set maximum logfile size
    --log-backupname                       set logfile name after rotation
    --logdate                              prefix logs with date or a strftime string
    --log-date                             prefix logs with date or a strftime string
    --log-prefix                           prefix logs with a string
    --log-zero                             log responses without body
    --log-slow                             log requests slower than the specified number of milliseconds
    --log-4xx                              log requests with a 4xx response
    --log-5xx                              log requests with a 5xx response
    --log-big                              log requestes bigger than the specified size
    --log-sendfile                         log sendfile requests
    --log-micros                           report response time in microseconds instead of milliseconds
    --log-x-forwarded-for                  use the ip from X-Forwarded-For header instead of REMOTE_ADDR
    --master-as-root                       leave master process running as root
    --drop-after-init                      run privileges drop after plugin initialization
    --drop-after-apps                      run privileges drop after apps loading
    --force-cwd                            force the initial working directory to the specified value
    --binsh                                override /bin/sh (used by exec hooks, it always fallback to /bin/sh)
    --chdir                                chdir to specified directory before apps loading
    --chdir2                               chdir to specified directory after apps loading
    --lazy                                 set lazy mode (load apps in workers instead of master)
    --lazy-apps                            load apps in each worker instead of the master
    --cheap                                set cheap mode (spawn workers only after the first request)
    --cheaper                              set cheaper mode (adaptive process spawning)
    --cheaper-initial                      set the initial number of processes to spawn in cheaper mode
    --cheaper-algo                         choose to algorithm used for adaptive process spawning)
    --cheaper-step                         number of additional processes to spawn at each overload
    --cheaper-overload                     increase workers after specified overload
    --cheaper-algo-list                    list enabled cheapers algorithms
    --cheaper-algos-list                   list enabled cheapers algorithms
    --cheaper-list                         list enabled cheapers algorithms
    --cheaper-rss-limit-soft               don't spawn new workers if total resident memory usage of all workers is higher than this limit
    --cheaper-rss-limit-hard               if total workers resident memory usage is higher try to stop workers
    --idle                                 set idle mode (put uWSGI in cheap mode after inactivity)
    --die-on-idle                          shutdown uWSGI when idle
    --mount                                load application under mountpoint
    --worker-mount                         load application under mountpoint in the specified worker or after workers spawn
    --threads                              run each worker in prethreaded mode with the specified number of threads
    --thread-stacksize                     set threads stacksize
    --threads-stacksize                    set threads stacksize
    --thread-stack-size                    set threads stacksize
    --threads-stack-size                   set threads stacksize
    --vhost                                enable virtualhosting mode (based on SERVER_NAME variable)
    --vhost-host                           enable virtualhosting mode (based on HTTP_HOST variable)
    --route                                add a route
    --route-host                           add a route based on Host header
    --route-uri                            add a route based on REQUEST_URI
    --route-qs                             add a route based on QUERY_STRING
    --route-remote-addr                    add a route based on REMOTE_ADDR
    --route-user-agent                     add a route based on HTTP_USER_AGENT
    --route-remote-user                    add a route based on REMOTE_USER
    --route-referer                        add a route based on HTTP_REFERER
    --route-label                          add a routing label (for use with goto)
    --route-if                             add a route based on condition
    --route-if-not                         add a route based on condition (negate version)
    --route-run                            always run the specified route action
    --final-route                          add a final route
    --final-route-status                   add a final route for the specified status
    --final-route-host                     add a final route based on Host header
    --final-route-uri                      add a final route based on REQUEST_URI
    --final-route-qs                       add a final route based on QUERY_STRING
    --final-route-remote-addr              add a final route based on REMOTE_ADDR
    --final-route-user-agent               add a final route based on HTTP_USER_AGENT
    --final-route-remote-user              add a final route based on REMOTE_USER
    --final-route-referer                  add a final route based on HTTP_REFERER
    --final-route-label                    add a final routing label (for use with goto)
    --final-route-if                       add a final route based on condition
    --final-route-if-not                   add a final route based on condition (negate version)
    --final-route-run                      always run the specified final route action
    --error-route                          add an error route
    --error-route-status                   add an error route for the specified status
    --error-route-host                     add an error route based on Host header
    --error-route-uri                      add an error route based on REQUEST_URI
    --error-route-qs                       add an error route based on QUERY_STRING
    --error-route-remote-addr              add an error route based on REMOTE_ADDR
    --error-route-user-agent               add an error route based on HTTP_USER_AGENT
    --error-route-remote-user              add an error route based on REMOTE_USER
    --error-route-referer                  add an error route based on HTTP_REFERER
    --error-route-label                    add an error routing label (for use with goto)
    --error-route-if                       add an error route based on condition
    --error-route-if-not                   add an error route based on condition (negate version)
    --error-route-run                      always run the specified error route action
    --response-route                       add a response route
    --response-route-status                add a response route for the specified status
    --response-route-host                  add a response route based on Host header
    --response-route-uri                   add a response route based on REQUEST_URI
    --response-route-qs                    add a response route based on QUERY_STRING
    --response-route-remote-addr           add a response route based on REMOTE_ADDR
    --response-route-user-agent            add a response route based on HTTP_USER_AGENT
    --response-route-remote-user           add a response route based on REMOTE_USER
    --response-route-referer               add a response route based on HTTP_REFERER
    --response-route-label                 add a response routing label (for use with goto)
    --response-route-if                    add a response route based on condition
    --response-route-if-not                add a response route based on condition (negate version)
    --response-route-run                   always run the specified response route action
    --router-list                          list enabled routers
    --routers-list                         list enabled routers
    --websockets-ping-freq                 set the frequency (in seconds) of websockets automatic ping packets
    --websocket-ping-freq                  set the frequency (in seconds) of websockets automatic ping packets
    --websockets-pong-tolerance            set the tolerance (in seconds) of websockets ping/pong subsystem
    --websocket-pong-tolerance             set the tolerance (in seconds) of websockets ping/pong subsystem
    --websockets-max-size                  set the max allowed size of websocket messages (in Kbytes, default 1024)
    --websocket-max-size                   set the max allowed size of websocket messages (in Kbytes, default 1024)
    --chunked-input-limit                  set the max size of a chunked input part (default 1MB, in bytes)
    --chunked-input-timeout                set default timeout for chunked input
    --clock                                set a clock source
    --clock-list                           list enabled clocks
    --clocks-list                          list enabled clocks
    --add-header                           automatically add HTTP headers to response
    --rem-header                           automatically remove specified HTTP header from the response
    --del-header                           automatically remove specified HTTP header from the response
    --collect-header                       store the specified response header in a request var (syntax: header var)
    --response-header-collect              store the specified response header in a request var (syntax: header var)
    --check-static                         check for static files in the specified directory
    --check-static-docroot                 check for static files in the requested DOCUMENT_ROOT
    --static-check                         check for static files in the specified directory
    --static-map                           map mountpoint to static directory (or file)
    --static-map2                          like static-map but completely appending the requested resource to the docroot
    --static-skip-ext                      skip specified extension from staticfile checks
    --static-index                         search for specified file if a directory is requested
    --static-safe                          skip security checks if the file is under the specified path
    --static-cache-paths                   put resolved paths in the uWSGI cache for the specified amount of seconds
    --static-cache-paths-name              use the specified cache for static paths
    --mimefile                             set mime types file path (default /etc/mime.types)
    --mime-file                            set mime types file path (default /etc/mime.types)
    --static-expires-type                  set the Expires header based on content type
    --static-expires-type-mtime            set the Expires header based on content type and file mtime
    --static-expires                       set the Expires header based on filename regexp
    --static-expires-mtime                 set the Expires header based on filename regexp and file mtime
    --static-expires-uri                   set the Expires header based on REQUEST_URI regexp
    --static-expires-uri-mtime             set the Expires header based on REQUEST_URI regexp and file mtime
    --static-expires-path-info             set the Expires header based on PATH_INFO regexp
    --static-expires-path-info-mtime       set the Expires header based on PATH_INFO regexp and file mtime
    --static-gzip                          if the supplied regexp matches the static file translation it will search for a gzip version
    --static-gzip-all                      check for a gzip version of all requested static files
    --static-gzip-dir                      check for a gzip version of all requested static files in the specified dir/prefix
    --static-gzip-prefix                   check for a gzip version of all requested static files in the specified dir/prefix
    --static-gzip-ext                      check for a gzip version of all requested static files with the specified ext/suffix
    --static-gzip-suffix                   check for a gzip version of all requested static files with the specified ext/suffix
    --honour-range                         enable support for the HTTP Range header
    --offload-threads                      set the number of offload threads to spawn (per-worker, default 0)
    --offload-thread                       set the number of offload threads to spawn (per-worker, default 0)
    --file-serve-mode                      set static file serving mode
    --fileserve-mode                       set static file serving mode
    --disable-sendfile                     disable sendfile() and rely on boring read()/write()
    --check-cache                          check for response data in the specified cache (empty for default cache)
    --close-on-exec                        set close-on-exec on sockets (could be required for spawning processes in requests)
    --mode                                 set uWSGI custom mode
    --env                                  set environment variable
    --envdir                               load a daemontools compatible envdir
    --early-envdir                         load a daemontools compatible envdir ASAP
    --unenv                                unset environment variable
    --vacuum                               try to remove all of the generated file/sockets
    --file-write                           write the specified content to the specified file (syntax: file=value) before privileges drop
    --cgroup                               put the processes in the specified cgroup
    --cgroup-opt                           set value in specified cgroup option
    --cgroup-dir-mode                      set permission for cgroup directory (default is 700)
    --namespace                            run in a new namespace under the specified rootfs
    --namespace-keep-mount                 keep the specified mountpoint in your namespace
    --ns                                   run in a new namespace under the specified rootfs
    --namespace-net                        add network namespace
    --ns-net                               add network namespace
    --enable-proxy-protocol                enable PROXY1 protocol support (only for http parsers)
    --reuse-port                           enable REUSE_PORT flag on socket (BSD only)
    --tcp-fast-open                        enable TCP_FASTOPEN flag on TCP sockets with the specified qlen value
    --tcp-fastopen                         enable TCP_FASTOPEN flag on TCP sockets with the specified qlen value
    --tcp-fast-open-client                 use sendto(..., MSG_FASTOPEN, ...) instead of connect() if supported
    --tcp-fastopen-client                  use sendto(..., MSG_FASTOPEN, ...) instead of connect() if supported
    --zerg                                 attach to a zerg server
    --zerg-fallback                        fallback to normal sockets if the zerg server is not available
    --zerg-server                          enable the zerg server on the specified UNIX socket
    --cron                                 add a cron task
    --cron2                                add a cron task (key=val syntax)
    --unique-cron                          add a unique cron task
    --cron-harakiri                        set the maximum time (in seconds) we wait for cron command to complete
    --legion-cron                          add a cron task runnable only when the instance is a lord of the specified legion
    --cron-legion                          add a cron task runnable only when the instance is a lord of the specified legion
    --unique-legion-cron                   add a unique cron task runnable only when the instance is a lord of the specified legion
    --unique-cron-legion                   add a unique cron task runnable only when the instance is a lord of the specified legion
    --loop                                 select the uWSGI loop engine
    --loop-list                            list enabled loop engines
    --loops-list                           list enabled loop engines
    --worker-exec                          run the specified command as worker
    --worker-exec2                         run the specified command as worker (after post_fork hook)
    --attach-daemon                        attach a command/daemon to the master process (the command has to not go in background)
    --attach-control-daemon                attach a command/daemon to the master process (the command has to not go in background), when the daemon dies, the master dies too
    --smart-attach-daemon                  attach a command/daemon to the master process managed by a pidfile (the command has to daemonize)
    --smart-attach-daemon2                 attach a command/daemon to the master process managed by a pidfile (the command has to NOT daemonize)
    --legion-attach-daemon                 same as --attach-daemon but daemon runs only on legion lord node
    --legion-smart-attach-daemon           same as --smart-attach-daemon but daemon runs only on legion lord node
    --legion-smart-attach-daemon2          same as --smart-attach-daemon2 but daemon runs only on legion lord node
    --daemons-honour-stdin                 do not change the stdin of external daemons to /dev/null
    --plugins                              load uWSGI plugins
    --plugin                               load uWSGI plugins
    --need-plugins                         load uWSGI plugins (exit on error)
    --need-plugin                          load uWSGI plugins (exit on error)
    --plugins-dir                          add a directory to uWSGI plugin search path
    --plugin-dir                           add a directory to uWSGI plugin search path
    --plugins-list                         list enabled plugins
    --plugin-list                          list enabled plugins
    --autoload                             try to automatically load plugins when unknown options are found
    --dlopen                               blindly load a shared library
    --allowed-modifiers                    comma separated list of allowed modifiers
    --remap-modifier                       remap request modifier from one id to another
    --dump-options                         dump the full list of available options
    --show-config                          show the current config reformatted as ini
    --binary-append-data                   return the content of a resource to stdout for appending to a uwsgi binary (for data:// usage)
    --print                                simple print
    --iprint                               simple print (immediate version)
    --exit                                 force exit() of the instance
    --cflags                               report uWSGI CFLAGS (useful for building external plugins)
    --dot-h                                dump the uwsgi.h used for building the core  (useful for building external plugins)
    --version                              print uWSGI version
    --psgi                                 load a psgi app
    --psgi-enable-psgix-io                 enable psgix.io support
    --perl-no-die-catch                    do not catch $SIG{__DIE__}
    --perl-local-lib                       set perl locallib path
    --perl-version                         print perl version
    --perl-args                            add items (space separated) to @ARGV
    --perl-arg                             add an item to @ARGV
    --perl-exec                            exec the specified perl file before fork()
    --perl-exec-post-fork                  exec the specified perl file after fork()
    --perl-auto-reload                     enable perl auto-reloader with the specified frequency
    --perl-auto-reload-ignore              ignore the specified files when auto-reload is enabled
    --plshell                              run a perl interactive shell
    --plshell-oneshot                      run a perl interactive shell (one shot)
    --symcall                              load the specified C symbol as the symcall request handler
    --symcall-register-rpc                 load the specified C symbol as an RPC function (syntax: name function)
    --symcall-post-fork                    call the specified C symbol after each fork()
    --ping                                 ping specified uwsgi host
    --ping-timeout                         set ping timeout
    --nagios                               nagios check
    --rrdtool                              store rrd files in the specified directory
    --rrdtool-freq                         set collect frequency
    --rrdtool-lib                          set the name of rrd library (default: librrd.so)
    --carbon                               push statistics to the specified carbon server
    --carbon-timeout                       set carbon connection timeout in seconds (default 3)
    --carbon-freq                          set carbon push frequency in seconds (default 60)
    --carbon-id                            set carbon id
    --carbon-no-workers                    disable generation of single worker metrics
    --carbon-max-retry                     set maximum number of retries in case of connection errors (default 1)
    --carbon-retry-delay                   set connection retry delay in seconds (default 7)
    --carbon-root                          set carbon metrics root node (default 'uwsgi')
    --carbon-hostname-dots                 set char to use as a replacement for dots in hostname (dots are not replaced by default)
    --carbon-name-resolve                  allow using hostname as carbon server address (default disabled)
    --carbon-resolve-names                 allow using hostname as carbon server address (default disabled)
    --carbon-idle-avg                      average values source during idle period (no requests), can be "last", "zero", "none" (default is last)
    --carbon-use-metrics                   don't compute all statistics, use metrics subsystem data instead (warning! key names will be different)
    --fastrouter                           run the fastrouter on the specified port
    --fastrouter-processes                 prefork the specified number of fastrouter processes
    --fastrouter-workers                   prefork the specified number of fastrouter processes
    --fastrouter-zerg                      attach the fastrouter to a zerg server
    --fastrouter-use-cache                 use uWSGI cache as hostname->server mapper for the fastrouter
    --fastrouter-use-pattern               use a pattern for fastrouter hostname->server mapping
    --fastrouter-use-base                  use a base dir for fastrouter hostname->server mapping
    --fastrouter-fallback                  fallback to the specified node in case of error
    --fastrouter-use-code-string           use code string as hostname->server mapper for the fastrouter
    --fastrouter-use-socket                forward request to the specified uwsgi socket
    --fastrouter-to                        forward requests to the specified uwsgi server (you can specify it multiple times for load balancing)
    --fastrouter-gracetime                 retry connections to dead static nodes after the specified amount of seconds
    --fastrouter-events                    set the maximum number of concurrent events
    --fastrouter-quiet                     do not report failed connections to instances
    --fastrouter-cheap                     run the fastrouter in cheap mode
    --fastrouter-subscription-server       run the fastrouter subscription server on the spcified address
    --fastrouter-subscription-slot         *** deprecated ***
    --fastrouter-timeout                   set fastrouter timeout
    --fastrouter-post-buffering            enable fastrouter post buffering
    --fastrouter-post-buffering-dir        put fastrouter buffered files to the specified directory
    --fastrouter-stats                     run the fastrouter stats server
    --fastrouter-stats-server              run the fastrouter stats server
    --fastrouter-ss                        run the fastrouter stats server
    --fastrouter-harakiri                  enable fastrouter harakiri
    --http                                 add an http router/server on the specified address
    --httprouter                           add an http router/server on the specified address
    --https                                add an https router/server on the specified address with specified certificate and key
    --https2                               add an https/spdy router/server using keyval options
    --https-export-cert                    export uwsgi variable HTTPS_CC containing the raw client certificate
    --https-session-context                set the session id context to the specified value
    --http-to-https                        add an http router/server on the specified address and redirect all of the requests to https
    --http-processes                       set the number of http processes to spawn
    --http-workers                         set the number of http processes to spawn
    --http-var                             add a key=value item to the generated uwsgi packet
    --http-to                              forward requests to the specified node (you can specify it multiple time for lb)
    --http-zerg                            attach the http router to a zerg server
    --http-fallback                        fallback to the specified node in case of error
    --http-modifier1                       set uwsgi protocol modifier1
    --http-modifier2                       set uwsgi protocol modifier2
    --http-use-cache                       use uWSGI cache as key->value virtualhost mapper
    --http-use-pattern                     use the specified pattern for mapping requests to unix sockets
    --http-use-base                        use the specified base for mapping requests to unix sockets
    --http-events                          set the number of concurrent http async events
    --http-subscription-server             enable the subscription server
    --http-timeout                         set internal http socket timeout
    --http-manage-expect                   manage the Expect HTTP request header (optionally checking for Content-Length)
    --http-keepalive                       HTTP 1.1 keepalive support (non-pipelined) requests
    --http-auto-chunked                    automatically transform output to chunked encoding during HTTP 1.1 keepalive (if needed)
    --http-auto-gzip                       automatically gzip content if uWSGI-Encoding header is set to gzip, but content size (Content-Length/Transfer-Encoding) and Content-Encoding are not specified
    --http-raw-body                        blindly send HTTP body to backends (required for WebSockets and Icecast support in backends)
    --http-websockets                      automatically detect websockets connections and put the session in raw mode
    --http-use-code-string                 use code string as hostname->server mapper for the http router
    --http-use-socket                      forward request to the specified uwsgi socket
    --http-gracetime                       retry connections to dead static nodes after the specified amount of seconds
    --http-quiet                           do not report failed connections to instances
    --http-cheap                           run the http router in cheap mode
    --http-stats                           run the http router stats server
    --http-stats-server                    run the http router stats server
    --http-ss                              run the http router stats server
    --http-harakiri                        enable http router harakiri
    --http-stud-prefix                     expect a stud prefix (1byte family + 4/16 bytes address) on connections from the specified address
    --rsyslog-packet-size                  set maximum packet size for syslog messages (default 1024) WARNING! using packets > 1024 breaks RFC 3164 (#4.1)
    --rsyslog-split-messages               split big messages into multiple chunks if they are bigger than allowed packet size (default is false)
    --zergpool                             start a zergpool on specified address for specified address
    --zerg-pool                            start a zergpool on specified address for specified address
    --rawrouter                            run the rawrouter on the specified port
    --rawrouter-processes                  prefork the specified number of rawrouter processes
    --rawrouter-workers                    prefork the specified number of rawrouter processes
    --rawrouter-zerg                       attach the rawrouter to a zerg server
    --rawrouter-use-cache                  use uWSGI cache as hostname->server mapper for the rawrouter
    --rawrouter-use-pattern                use a pattern for rawrouter hostname->server mapping
    --rawrouter-use-base                   use a base dir for rawrouter hostname->server mapping
    --rawrouter-fallback                   fallback to the specified node in case of error
    --rawrouter-use-code-string            use code string as hostname->server mapper for the rawrouter
    --rawrouter-use-socket                 forward request to the specified uwsgi socket
    --rawrouter-to                         forward requests to the specified uwsgi server (you can specify it multiple times for load balancing)
    --rawrouter-gracetime                  retry connections to dead static nodes after the specified amount of seconds
    --rawrouter-events                     set the maximum number of concurrent events
    --rawrouter-max-retries                set the maximum number of retries/fallbacks to other nodes
    --rawrouter-quiet                      do not report failed connections to instances
    --rawrouter-cheap                      run the rawrouter in cheap mode
    --rawrouter-subscription-server        run the rawrouter subscription server on the spcified address
    --rawrouter-subscription-slot          *** deprecated ***
    --rawrouter-timeout                    set rawrouter timeout
    --rawrouter-stats                      run the rawrouter stats server
    --rawrouter-stats-server               run the rawrouter stats server
    --rawrouter-ss                         run the rawrouter stats server
    --rawrouter-harakiri                   enable rawrouter harakiri
    --rawrouter-xclient                    use the xclient protocol to pass the client addres
    --sslrouter                            run the sslrouter on the specified port
    --sslrouter2                           run the sslrouter on the specified port (key-value based)
    --sslrouter-session-context            set the session id context to the specified value
    --sslrouter-processes                  prefork the specified number of sslrouter processes
    --sslrouter-workers                    prefork the specified number of sslrouter processes
    --sslrouter-zerg                       attach the sslrouter to a zerg server
    --sslrouter-use-cache                  use uWSGI cache as hostname->server mapper for the sslrouter
    --sslrouter-use-pattern                use a pattern for sslrouter hostname->server mapping
    --sslrouter-use-base                   use a base dir for sslrouter hostname->server mapping
    --sslrouter-fallback                   fallback to the specified node in case of error
    --sslrouter-use-code-string            use code string as hostname->server mapper for the sslrouter
    --sslrouter-use-socket                 forward request to the specified uwsgi socket
    --sslrouter-to                         forward requests to the specified uwsgi server (you can specify it multiple times for load balancing)
    --sslrouter-gracetime                  retry connections to dead static nodes after the specified amount of seconds
    --sslrouter-events                     set the maximum number of concusrent events
    --sslrouter-max-retries                set the maximum number of retries/fallbacks to other nodes
    --sslrouter-quiet                      do not report failed connections to instances
    --sslrouter-cheap                      run the sslrouter in cheap mode
    --sslrouter-subscription-server        run the sslrouter subscription server on the spcified address
    --sslrouter-timeout                    set sslrouter timeout
    --sslrouter-stats                      run the sslrouter stats server
    --sslrouter-stats-server               run the sslrouter stats server
    --sslrouter-ss                         run the sslrouter stats server
    --sslrouter-harakiri                   enable sslrouter harakiri
    --sslrouter-sni                        use SNI to route requests
    --cheaper-busyness-max                 set the cheaper busyness high percent limit, above that value worker is considered loaded (default 50)
    --cheaper-busyness-min                 set the cheaper busyness low percent limit, belowe that value worker is considered idle (default 25)
    --cheaper-busyness-multiplier          set initial cheaper multiplier, worker needs to be idle for cheaper-overload*multiplier seconds to be cheaped (default 10)
    --cheaper-busyness-penalty             penalty for respawning workers to fast, it will be added to the current multiplier value if worker is cheaped and than respawned back too fast (default 2)
    --cheaper-busyness-verbose             enable verbose log messages from busyness algorithm
    --cheaper-busyness-backlog-alert       spawn emergency worker(s) if anytime listen queue is higher than this value (default 33)
    --cheaper-busyness-backlog-multiplier  set cheaper multiplier used for emergency workers (default 3)
    --cheaper-busyness-backlog-step        number of emergency workers to spawn at a time (default 1)
    --cheaper-busyness-backlog-nonzero     spawn emergency worker(s) if backlog is > 0 for more then N seconds (default 60)


didn't test it, just built it.


EDIT:

bundled up a libz-so.1 to dump in /mnt/us/extensions/uwsgi/usr/lib
if you want to get rid of that version warning.

Oh and these work on a k3 and above...

Cheers
Attached Files
File Type: zip uwsgi-perl-KUAL-dummy.zip (15.47 MB, 589 views)
File Type: zip libz.so.1.zip (42.6 KB, 598 views)

Last edited by twobob; 11-18-2013 at 09:11 AM.
twobob is offline   Reply With Quote
Old 11-18-2013, 09:15 AM   #12
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Does that thing have enough options?
I don't see any: "--moon-in-third-quarter" options in the list.

Nor any: "--include-kitchen-sink"
knc1 is offline   Reply With Quote
Old 11-18-2013, 09:55 AM   #13
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
[root@kindle root]# /mnt/us/extensions/uwsgi/uwsgi -s /var/run/uwsgi.socket
Quote:
*** Starting uWSGI 1.9.20 (32bit) on [Mon Nov 18 14:53:09 2013] ***
compiled with version: 4.3.2 on 18 November 2013 13:23:27
os: Linux-2.6.26-rt-lab126 #5 Sat Sep 1 14:28:26 PDT 2012
nodename: kindle
machine: armv6l
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /var/tmp/root
detected binary path: /mnt/us/extensions/uwsgi/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 2048
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
!!! it looks like your kernel does not support pthread robust mutexes !!!
!!! falling back to standard pthread mutexes !!!
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /var/run/uwsgi.socket fd 3
initialized Perl 5.10.1 main interpreter at 0xd12e0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 64304 bytes (62 KB) for 1 cores
*** Operational MODE: single process ***
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 31051, cores: 1)
There, tested. runs fine.
twobob is offline   Reply With Quote
Old 11-18-2013, 09:56 AM   #14
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
A for-real, serious question here

Now that this thread that includes non-Apache servers has caught the interest of "server type people" -
I have a serious question:

I have a need to support SRP over HTTPS (TLS-SRP) on a web site.

To do that with OpenSSL requires at least version 1.0.1
It can also be done using GNUTLS package (minimum version unknown).

Do any of these non-Apache servers support TLS-SRP authentication?

(My hosting provider does not support a new enough mod-ssl - good 'ol customer service says: "run your own server".)

Since TLS-SRP is only supported by a very limited number of browsers, the client code will be in Javascript:
http://code.google.com/p/srp-js/
knc1 is offline   Reply With Quote
Old 11-18-2013, 10:20 AM   #15
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
https://wiki.mozilla.org/Security/DNSSEC-TLS-nginx

"This page details how to set up a server running a modified version of nginx that uses a self-signed certificate with the DNSSEC TLS extension to authenticate https sessions. It's probably safest to do this in a virtual machine. However, for the brave, simply skip the VM-specific steps."
twobob is offline   Reply With Quote
Reply

Tags
fast-cgi, kindle, lamp, perl, rt request tracker, twobob


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
tiny C compiler on the kindle lrizzo Kindle Developer's Corner 13 04-16-2018 10:44 AM
php-cli/cgi - All kindles twobob Kindle Developer's Corner 13 09-27-2013 07:50 AM
Help finding tiny towers and tiny zoo mojkadona Kindle Fire 5 04-26-2012 07:02 PM
How to handle RSS sites with redirections (cgi-bin) Bortolotto Recipes 2 07-09-2011 12:13 AM
Kindle dx has a tiny chip ryeyoo Amazon Kindle 4 12-05-2010 02:21 AM


All times are GMT -4. The time now is 04:30 AM.


MobileRead.com is a privately owned, operated and funded community.