UWSGI_RACK_RUBY32(1)
π NAME π
uwsgi_rack_ruby32 β fast (pure C), self-healing, developer-friendly WSGI server. Bestie, this is the UWSGI_RACK_RUBY32(1) manual, User Commands, part 1, and we are about to get you fluent in every single flag. No cap. π
β¨ SYNOPSIS β¨
Run it like this, periodt:
uwsgi-core-local [options...]
πΈ DESCRIPTION πΈ
Okay so DESCRIPTION is literally the whole option buffet. Every flag, every vibe, every little config knob. We're doing them in order, bestie, so grab a strawberry drink π and let's go.
-s,--socketβ bind to the specified UNIX/TCP socket using the default protocol. classic move β¨-s,--uwsgi-socketβ bind to the specified UNIX/TCP socket using theuwsgiprotocol. uwsgi gang π--suwsgi-socketβ bind to the specified UNIX/TCP socket using theuwsgiprotocol over SSL. secure-ish π¦--ssl-socketβ bind to the specified UNIX/TCP socket using theuwsgiprotocol over SSL. twin flame π--http-socketβ bind to the specified UNIX/TCP socket using HTTP protocol. hello browser π--http-socket-modifier1β force the specifiedmodifier1when using HTTP protocol. force it π--http-socket-modifier2β force the specifiedmodifier2when using HTTP protocol. modifier2, slay β¨--http11-socketβ bind to the specified UNIX/TCP socket using HTTP 1.1 (Keep-Alive) protocol. keep it alive π₯--https-socketβ bind to the specified UNIX/TCP socket using HTTPS protocol. padlock energy π--https-socket-modifier1β force the specifiedmodifier1when using HTTPS protocol. modifier magic π--https-socket-modifier2β force the specifiedmodifier2when using HTTPS protocol. modifier2 moment π§--fastcgi-socketβ bind to the specified UNIX/TCP socket using FastCGI protocol. FastCGI bestie π--fastcgi-nph-socketβ bind to the specified UNIX/TCP socket using FastCGI protocol (nph mode). nph mode activated β¨--fastcgi-modifier1β force the specifiedmodifier1when using FastCGI protocol. force field π--fastcgi-modifier2β force the specifiedmodifier2when using FastCGI protocol. modifier2, no cap β--scgi-socketβ bind to the specified UNIX/TCP socket using SCGI protocol. SCGI szn πΈ--scgi-nph-socketβ bind to the specified UNIX/TCP socket using SCGI protocol (nph mode). nph again β¨--scgi-modifier1β force the specifiedmodifier1when using SCGI protocol. modifier1, periodt π--scgi-modifier2β force the specifiedmodifier2when using SCGI protocol. modifier2 energy π₯--raw-socketβ bind to the specified UNIX/TCP socket using RAW protocol. raw and unbothered π--raw-modifier1β force the specifiedmodifier1when using RAW protocol. raw modifier1 π§--raw-modifier2β force the specifiedmodifier2when using RAW protocol. raw modifier2 π--puwsgi-socketβ bind to the specified UNIX/TCP socket using persistentuwsgiprotocol (puwsgi). persistent queen π--protocolβ force the specified protocol for default sockets. protocol override β--socket-protocolβ force the specified protocol for default sockets. same vibe, different flag π--shared-socketβ create a shared socket for advanced jailing or ipc. sharing is caring π«Ά--undeferred-shared-socketβ create a shared socket for advanced jailing or ipc (undeferred mode). undeferred mode β¨-p,--processesβ spawn the specified number of workers/processes. more workers, more slay π-p,--workersβ spawn the specified number of workers/processes. twin flag π--thunder-lockβ serializeaccept()usage (if possible). thunder lock, so dramatic π₯-t,--harakiriβ set harakiri timeout. harakiri timeout π--harakiri-verboseβ enable verbose mode for harakiri. verbose harakiri π--harakiri-graceful-timeoutβ interval between graceful harakiri attempt and a sigkill. graceful then sigkill β--harakiri-graceful-signalβ use this signal instead of sigterm for graceful harakiri attempts. signal swap β¨--harakiri-queue-thresholdβ only trigger harakiri if queue is greater than this threshold. threshold trigger π--harakiri-no-arhβ do not enable harakiri during after-request-hook. no arh harakiri π--no-harakiri-arhβ do not enable harakiri during after-request-hook. same thing, another alias π--no-harakiri-after-req-hookβ do not enable harakiri during after-request-hook. after-req-hook no harakiri π--backtrace-depthβ set backtrace depth. deep backtrace π₯--mule-harakiriβ set harakiri timeout for mule tasks. mule harakiri π§-x,--xmlconfigβ load config from xml file. xml config β¨-x,--xmlβ load config from xml file. xml alias π--configβ load configuration using the pluggable system. pluggable config π--fallback-configβ re-exec uwsgi with the specified config when exit code is 1. fallback plan π--strictβ enable strict mode (placeholder cannot be used). strict mode, no placeholders β--skip-zeroβ skip check of file descriptor 0. skip fd 0 π¦--skip-atexitβ skip atexit hooks (ignored by the master). atexit skip π--skip-atexit-teardownβ skip atexit teardown (ignored by the master). teardown skip π-S,--setβ set a placeholder or an option. set it π--set-placeholderβ set a placeholder. placeholder vibes β¨--set-phβ set a placeholder. ph alias π--getβ print the specified option value and exit. print and dip π--declare-optionβ declare a new uWSGI custom option. custom option, declare it π--declare-option2β declare a new uWSGI custom option (non-immediate). non-immediate custom β--resolveβ place the result of a dns query in the specified placeholder, sytax:placeholder=name(immediate option). dns resolve, yes the typo is real π--forβ (opt logic) for cycle. opt logic for loop π§--for-globβ (opt logic) for cycle (expand glob). glob expand π--for-timesβ (opt logic) for cycle (expand the specified num to a list starting from 1). times loop π--for-readlineβ (opt logic) for cycle (expand the specified file to a list of lines). readline loop π--endforβ (opt logic) end for cycle. end for β¨--end-forβ (opt logic) end for cycle. end for alias π--if-optβ (opt logic) check for option. if opt β--if-not-optβ (opt logic) check for option. if not opt π--if-envβ (opt logic) check for environment variable. if env πΈ--if-not-envβ (opt logic) check for environment variable. if not env π--ifenvβ (opt logic) check for environment variable. ifenv alias π§--if-reloadβ (opt logic) check for reload. if reload π₯--if-not-reloadβ (opt logic) check for reload. if not reload π--if-hostnameβ (opt logic) check for hostname. if hostname π--if-not-hostnameβ (opt logic) check for hostname. if not hostname β¨--if-hostname-matchβ (opt logic) try to match hostname against a regular expression. regex hostname π--if-not-hostname-matchβ (opt logic) try to match hostname against a regular expression. regex hostname, but not β--if-existsβ (opt logic) check for file/directory existence. if exists π--if-not-existsβ (opt logic) check for file/directory existence. if not exists π--ifexistsβ (opt logic) check for file/directory existence. ifexists alias π--if-pluginβ (opt logic) check for plugin. if plugin π§--if-not-pluginβ (opt logic) check for plugin. if not plugin π--ifpluginβ (opt logic) check for plugin. ifplugin alias π--if-fileβ (opt logic) check for file existance. if file β¨--if-not-fileβ (opt logic) check for file existance. if not file π--if-dirβ (opt logic) check for directory existance. if dir β--if-not-dirβ (opt logic) check for directory existance. if not dir πΈ--ifdirβ (opt logic) check for directory existance. ifdir alias π¦--if-directoryβ (opt logic) check for directory existance. if directory π--endifβ (opt logic) end if. end if π--end-ifβ (opt logic) end if. end if alias π--blacklistβ set options blacklist context. blacklist context π--end-blacklistβ clear options blacklist context. clear blacklist β¨--whitelistβ set options whitelist context. whitelist context π--end-whitelistβ clear options whitelist context. clear whitelist π--ignore-sigpipeβ do not report (annoying) SIGPIPE. ignore SIGPIPE π--ignore-write-errorsβ do not report (annoying)write()/writev()errors. ignore write errors π--write-errors-toleranceβ set the maximum number of allowed write errors (default: no tolerance). tolerance level: zero β--write-errors-exception-onlyβ only raise an exception on write errors giving control to the app itself. exception only π₯--disable-write-exceptionβ disable exception generation onwrite()/writev(). no write exception π--inheritβ use the specified file as config template. inherit template π--includeβ include the specified file as immediate configuration. include config β¨--inject-beforeβ inject a text file before the config file (advanced templating). inject before π--inject-afterβ inject a text file after the config file (advanced templating). inject after π-d,--daemonizeβ daemonize uWSGI. daemonize it π--daemonize2β daemonize uWSGI after app loading. daemonize after app load β--stopβ stop an instance. stop an instance π--reloadβ reload an instance. reload an instance π₯--pauseβ pause an instance. pause an instance β¨--suspendβ suspend an instance. suspend an instance π--resumeβ resume an instance. resume an instance π--connect-and-readβ connect to a socket and wait for data from it. connect and read π¦--extractβ fetch/dump any supported address to stdout. extract to stdout π-l,--listenβ set the socket listen queue size. listen queue size π-v,--max-varsβ set the amount of internal iovec/vars structures. max vars β¨--max-appsβ set the maximum number of per-worker applications. max apps per worker π-b,--buffer-sizeβ set internal buffer size. buffer size β-m,--memory-reportβ enable memory report. memory report π--profilerβ enable the specified profiler. profiler on π₯-c,--cgi-modeβ force CGI-mode for plugins supporting it. CGI mode π-a,--abstract-socketβ force UNIX socket in abstract mode (Linux only). abstract socket, Linux only π¦-C,--chmod-socketβchmod-socket. the description is literallychmod-socket, iconic β¨-C,--chmodβchmod-socket. same alias energy π--chown-socketβ chown unix sockets. chown unix sockets π--umaskβ set umask. set umask β--freebindβ put socket in freebind mode. freebind mode π§--map-socketβ map sockets to specific workers. map sockets to workers π-T,--enable-threadsβ enable threads. enable threads π₯--no-threads-waitβ do not wait for threads cancellation on quit/reload. no threads wait π--auto-procnameβ automatically set processes name to something meaningful. auto procname π--procname-prefixβ add a prefix to the process names. procname prefix β¨--procname-prefix-spacedβ add a spaced prefix to the process names. spaced prefix π--procname-appendβ append a string to process names. procname append π--procnameβ set process names. set process names β--procname-masterβ set master process name. master procname π-i,--single-interpreterβ do not use multiple interpreters (where available). single interpreter π§--need-appβ exit if no app can be loaded. need app or exit π-M,--masterβ enable master process. master process π--honour-stdinβ do not remap stdin to/dev/null. honour stdin π--emperorβ run the Emperor. run the Emperor π--emperor-proxy-socketβ force the vassal to became an Emperor proxy. emperor proxy socket β¨--emperor-wrapperβ set a binary wrapper for vassals. emperor wrapper π--emperor-wrapper-overrideβ set a binary wrapper for vassals to try before the default one. wrapper override β--emperor-wrapper-fallbackβ set a binary wrapper for vassals to try as a last resort. wrapper fallback π--emperor-nofollowβ do not follow symlinks when checking for mtime. nofollow symlinks π¦--emperor-procnameβ set the Emperor process name. emperor procname π--emperor-freqβ set the Emperor scan frequency (default 3 seconds). emperor freq, default 3 seconds β--emperor-required-heartbeatβ set the Emperor tolerance about heartbeats. required heartbeat π--emperor-curse-toleranceβ set the Emperor tolerance about cursed vassals. curse tolerance π--emperor-pidfileβ write the Emperor pid in the specified file. emperor pidfile π
Okay so this next chunk is a LOT of Emperor stuff and then the security/fd/cache/spooler zone, buckle up bestie π
--emperor-tyrantβ puts the Emperor into Tyrant mode π (yes that's the actual name, it's giving monarchy)--emperor-tyrant-nofollowβ do not follow symlinks when it's checking for uid/gid in Tyrant mode π«π--emperor-statsβ runs the Emperor stats server π--emperor-stats-serverβ also runs the Emperor stats server (same thing, different spelling of the flag, iykyk)--early-emperorβ spawns the emperor as soon as possibile β° (yes, "possibile" β that's the original spelling, keeping it fr fr)--emperor-broodlordβ runs the emperor in BroodLord mode π£ (iconic name, no notes)--emperor-throttleβ sets the throttling level (in milliseconds) for bad behaving vassals β default is1000π€--emperor-max-throttleβ sets the max throttling level (in milliseconds) for bad behaving vassals β default is3 minutesπ§--emperor-magic-execβ prefixes vassals config files withexec://if they have the executable bit β¨--emperor-on-demand-extensionβ searches for a text file (vassal name + extension) containing the on demand socket name π--emperor-on-demand-extβ same deal: searches for a text file (vassal name + extension) containing the on demand socket name--emperor-on-demand-directoryβ enables on demand mode, binding to the unix socket in the specified directory, named like the vassal +.socketπ--emperor-on-demand-dirβ enables on demand mode, binding to the unix socket in the specified directory, named like the vassal +.socket--emperor-on-demand-execβ uses the output of the specified command as the on demand socket name (the vassal name gets passed as the only argument) π»--emperor-extra-extensionβ allows the specified extension in the Emperor (the vassal will be called with--config) π--emperor-extra-extβ allows the specified extension in the Emperor (the vassal will be called with--config)--emperor-no-blacklistβ disables the Emperor blacklisting subsystem π«--emperor-use-cloneβ usesclone()instead offork(), passing the specifiedunshare()flags π§¬--emperor-graceful-shutdownβ uses vassals graceful shutdown during ragnarok π (yes, ragnarok, the end times, it's a whole vibe)--emperor-capβ sets vassals capability π--vassals-capβ sets vassals capability--vassal-capβ sets vassals capability--imperial-monitor-listβ lists enabled imperial monitors π--imperial-monitors-listβ lists enabled imperial monitors--vassals-inheritβ adds config templates to vassals config (uses--inherit) π--vassals-includeβ includes config templates into vassals config (uses--includeinstead of--inherit)--vassals-inherit-beforeβ adds config templates to vassals config (uses--inherit, and parses before the vassal file) β¬ οΈ--vassals-include-beforeβ includes config templates into vassals config (uses--includeinstead of--inherit, and parses before the vassal file)--vassals-start-hookβ runs the specified command before each vassal starts π--vassals-stop-hookβ runs the specified command after vassal's death π--vassal-sosβ asks the emperor for reinforcement when overloaded π--vassal-sos-backlogβ asks the emperor for sos if the backlog queue has more items than the value specified π--vassals-setβ automatically sets the specified option (via--set) for every vassal βοΈ--vassal-setβ automatically sets the specified option (via--set) for every vassal--heartbeatβ announces healthiness to the emperor π--reload-mercyβ sets the maximum time (in seconds) we wait for workers and other processes to die during reload/shutdown β³--worker-reload-mercyβ sets the maximum time (in seconds) a worker can take to reload/shutdown β default is60π--mule-reload-mercyβ sets the maximum time (in seconds) a mule can take to reload/shutdown β default is60π΄--exit-on-reloadβ forces exit even if a reload is requested πͺ--die-on-termβ exits instead of doing a brutal reload onSIGTERMβ οΈ--force-gatewayβ forces the spawn of the first registered gateway without a master π-h,--helpβ shows this help π-h,--usageβ shows this help--print-symβ prints the content of the specified binary symbol π¬--print-symbolβ prints the content of the specified binary symbol-r,--reaperβ callswaitpid(-1,...)after each request to get rid of zombies π§ (actual zombies, not the fun kind)-R,--max-requestsβ reloads workers after the specified amount of managed requests π--min-worker-lifetimeβ number of seconds a worker must run before being reloaded β default is60β±οΈ--max-worker-lifetimeβ reloads workers after the specified amount of seconds β default is disabled π«--max-worker-lifetime-deltaβ adds(worker_id * delta)seconds to themax_worker_lifetimevalue of each worker β-z,--socket-timeoutβ sets internal sockets timeout β²οΈ--no-fd-passingβ disables file descriptor passing π·--locksβ creates the specified number of shared locks π--lock-engineβ sets the lock engine βοΈ--ftokβ sets the ipcsem key viaftok()for avoiding duplicates π--persistent-ipcsemβ does not remove ipcsem's on shutdown πΎ-A,--sharedareaβ creates a raw shared memory area of specified pages (note: it supports keyval too) π§--safe-fdβ does not close the specified file descriptor π--fd-safeβ does not close the specified file descriptor--cacheβ creates a shared cache containing given elements ποΈ--cache-blocksizeβ sets cache blocksize π§±--cache-storeβ enables persistent cache to disk π½--cache-store-syncβ sets the frequency of sync for persistent cache π--cache-no-expireβ disables auto sweep of expired items π§Ή--cache-expire-freqβ sets the frequency of cache sweeper scans β default3 secondsβ°--cache-report-freed-itemsβ constantly reports the cache item freed by the sweeper (use only for debug) π--cache-udp-serverβ binds the cache udp server (used only for set/update/delete) to the specified socket π‘--cache-udp-nodeβ sends cache update/deletion to the specified cache udp server π€--cache-syncβ copies the whole content of another uWSGI cache server on server startup π₯--cache-use-last-modifiedβ updates thelast_modified_attimestamp on every cache item modification β default is disabled π°οΈ--add-cache-itemβ adds an item in the cache β--load-file-in-cacheβ loads a static file in the cache π--load-file-in-cache-gzipβ loads a static file in the cache with gzip compression ποΈ--cache2β creates a new generation shared cache (keyval syntax) β¨--queueβ enables shared queue πΆ--queue-blocksizeβ sets queue blocksize π§±--queue-storeβ enables persistent queue to disk π½--queue-store-syncβ sets the frequency of sync for persistent queue π-Q,--spoolerβ runs a spooler on the specified directory π¨οΈ--spooler-externalβ maps spoolers requests to a spooler directory managed by an external instance π--spooler-orderedβ tries to order the execution of spooler tasks π’--spooler-chdirβchdir()to the specified directory before each spooler task π--spooler-processesβ sets the number of processes for spoolers π―--spooler-quietβ does not be verbose with spooler tasks π€«--spooler-max-tasksβ sets the maximum number of tasks to run before recycling a spooler β»οΈ--spooler-harakiriβ sets harakiri timeout for spooler tasks π‘οΈ--spooler-frequencyβ sets spooler frequency πΆ--spooler-freqβ sets spooler frequency--muleβ adds a mule π΄--mulesβ adds the specified number of mules π΄π΄π΄--farmβ adds a mule farm π--mule-msg-sizeβ sets mule message buffer size π¨--signalβ sends a uwsgi signal to a server πΆ--signal-bufsizeβ sets buffer size for the signal queue π¦--signals-bufsizeβ sets buffer size for the signal queue--signal-timerβ adds a timer (syntax:<signal> <seconds>) β°--timerβ adds a timer (syntax:<signal> <seconds>)--signal-rbtimerβ adds a redblack timer (syntax:<signal> <seconds>) π³--rbtimerβ adds a redblack timer (syntax:<signal> <seconds>)--rpc-maxβ maximum number of rpc slots β default:64π-L,--disable-loggingβ disables request logging π--flockβ locks the specified file before starting, exits if locked π--flock-waitβ locks the specified file before starting, waits if locked βΈοΈ--flock2β locks the specified file after logging/daemon setup, exits if locked π--flock-wait2β locks the specified file after logging/daemon setup, waits if locked βΈοΈ--pidfileβ creates a pidfile (before privileges drop) π--pidfile2β creates a pidfile (after privileges drop) π--safe-pidfileβ creates a safe pidfile (before privileges drop) π--safe-pidfile2β creates a safe pidfile (after privileges drop) π--chrootβchroot()to the specified directory π°--pivot-rootβpivot_root()to the specified directories (new_rootandput_oldmust be separated with a space) π--pivot_rootβpivot_root()to the specified directories (new_rootandput_oldmust be separated with a space)--uidβsetuidto the specified user/uid π§--gidβsetgidto the specified group/gid π₯--add-gidβ adds the specified group id to the process credentials β--immediate-uidβsetuidto the specified user/uid IMMEDIATELY β‘--immediate-gidβsetgidto the specified group/gid IMMEDIATELY β‘--no-initgroupsβ disables additional groups set viainitgroups()π«--capβ sets process capability π--unshareβunshare()part of the processes and puts it in a new namespace π«§--unshare2βunshare()part of the processes and puts it in a new namespace after rootfs change π«§--setns-socketβ exposes a unix socket returning namespace fds from/proc/self/nsπ--setns-socket-skipβ skips the specified entry when sending setns file descriptors βοΈ--setns-skipβ skips the specified entry when sending setns file descriptors--setnsβ joins a namespace created by an external uWSGI instance π€--setns-preopenβ opens/proc/self/nsas soon as possible and caches fds ποΈ--jailedβ marks the instance as jailed (forces the execution ofpost_jailhooks) βοΈ
ngl that was a whole journey bestie, and we're not even done π more coming, don't go anywhere π«Ά
β¨ OPTIONS β¨
Okay bestie, deep breath. This is the big list. It's giving infinite scroll, but every single one of these is real and useful so we're going through them together, no skipping. π«Ά
First up: the fork-again crew. If you're doing jails, these are your girls. π
--reforkβ do a whole extrafork()after the privileges drop. Super useful for jailing systems.--re-forkβ exactly the same thing as--refork, anotherfork()after the privileges drop. Also for jailing systems. (Yes they're twins, we love a duplicate name moment. π―)--refork-as-rootβfork()again before the privileges drop. Useful for jailing systems.--re-fork-as-rootβ same energy:fork()again before the privileges drop, useful for jailing systems.--refork-post-jailβfork()again after jailing. Useful for jailing systems.--re-fork-post-jailβ yeah,fork()again after jailing, useful for jailing systems. Periodt.
Now the hooks π β "run the specified hook" is the vibe here, it's just when that changes. Pick your moment:
--hook-asapβ run the specified hook as soon as possible. no waiting, main character energy β‘--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 the privileges drop.--hook-as-userβ run the specified hook after the 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-post-forkβ run the specified hook after each fork.--hook-acceptingβ run the specified hook after each worker enters the accepting phase.--hook-accepting1β run the specified hook after the first worker enters the accepting phase.--hook-accepting-onceβ run the specified hook after each worker enters the accepting phase (once per-instance).--hook-accepting1-onceβ run the specified hook after the first worker enters the accepting phase (once per instance).--hook-master-startβ run the specified hook when the Master starts. π--hook-touchβ run the specified hook when the specified file is touched. syntax:<file> <action>--hook-emperor-startβ run the specified hook when the Emperor starts.--hook-emperor-stopβ run the specified hook when the Emperor sends a stop message.--hook-emperor-reloadβ run the specified hook when the Emperor sends a reload message.--hook-emperor-lostβ run the specified hook when the Emperor connection is lost. π--hook-as-vassalβ run the specified hook beforeexec()ing the vassal.--hook-as-emperorβ run the specified hook in the emperor after the vassal has been started.--hook-as-muleβ run the specified hook in each mule.--hook-as-gatewayβ run the specified hook in each gateway.
And two little per-request besties that do the same thing:
--after-request-hookβ run the specified function/symbol after each request.--after-request-callβ run the specified function/symbol after each request.
Same exact timeline, but for running commands instead of hooks. Slay. π₯
--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 the privileges drop.--exec-as-userβ run the specified command after the 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 beforeexec()ing the vassal.--exec-as-emperorβ run the specified command in the emperor after the vassal has been started.
Mounts! π§ (they're just filesystems, but make it fashion)
--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 the privileges drop.--mount-as-vassalβ mount filesystem beforeexec()ing the vassal.--mount-as-emperorβ mount filesystem in the emperor after the vassal has been started.
And the un-mounties, same timings, opposite direction:
--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 the privileges drop.--umount-as-vassalβ unmount filesystem beforeexec()ing the vassal.--umount-as-emperorβ unmount filesystem in the emperor after the vassal has been started.
Waiting room era π β these make uWSGI chill until the thing it needs actually shows up.
--wait-for-interfaceβ wait for the specified network interface to come up before running root hooks.--wait-for-interface-timeoutβ set the timeout forwait-for-interface.--wait-interfaceβ wait for the specified network interface to come up before running root hooks. (same deal, shorter name β¨)--wait-interface-timeoutβ set the timeout forwait-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 forwait-for-interface.--wait-ifaceβ wait for the specified network interface to come up before running root hooks.--wait-iface-timeoutβ set the timeout forwait-for-interface.--wait-for-fsβ wait for the specified filesystem item to appear before running root hooks.--wait-for-fileβ wait for the specified file to appear before running root hooks.--wait-for-dirβ wait for the specified directory to appear before running root hooks.--wait-for-mountpointβ wait for the specified mountpoint to appear before running root hooks.--wait-for-fs-timeoutβ set the timeout forwait-for-fs/file/dir.--wait-for-socketβ wait for the specified socket to be ready before loading apps. π§¦--wait-for-socket-timeoutβ set the timeout forwait-for-socket.
Now the call family β these call a specified function at a specific moment. And because C doesn't do vibes-based argument passing, the name tells you the exact signature. Keep these EXACT, bestie, character for character:
--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 the privileges drop.--call-as-userβ call the specified function after the 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 specifiedfunction()beforeexec()ing the vassal.--call-as-vassal1β call the specifiedfunction(char *)beforeexec()ing the vassal.--call-as-vassal3β call the specifiedfunction(char *, uid_t, gid_t)beforeexec()ing the vassal.--call-as-emperorβ call the specifiedfunction()in the emperor after the vassal has been started.--call-as-emperor1β call the specifiedfunction(char *)in the emperor after the vassal has been started.--call-as-emperor2β call the specifiedfunction(char *, pid_t)in the emperor after the vassal has been started.--call-as-emperor4β call the specifiedfunction(char *, pid_t, uid_t, gid_t)in the emperor after the vassal has been started.
Config-loading time π β yes, you can read your settings in from a file instead of screaming flags at the terminal:
--iniβ load config from ini file.-y,--yamlβ load config from yaml file.-y,--ymlβ load config from yaml file.-j,--jsonβ load config from json file.-j,--jsβ load config from json file.
A lil cluster-flavored batch π«:
--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.
Sockets & TCP glow-up β¨:
--no-defer-acceptβ disable deferred-accept on sockets.--tcp-nodelayβ enable TCP NODELAY on each request.--so-keepaliveβ enable TCP KEEPALIVEs.--so-send-timeoutβ setSO_SNDTIMEO.--socket-send-timeoutβ setSO_SNDTIMEO.--so-write-timeoutβ setSO_SNDTIMEO.--socket-write-timeoutβ setSO_SNDTIMEO.--socket-sndbufβ setSO_SNDBUF.--socket-rcvbufβ setSO_RCVBUF.--shutdown-socketsβ force callingshutdown()in addition toclose()when sockets are destroyed.
Memory & limits, aka the part where we get responsible π§ :
--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. (it's called evil for a reason, ok π)--evil-reload-on-rssβ force the master to reload a worker if its rss memory is higher than specified megabytes.--mem-collector-freqβ set the memory collector frequency when evil reloads are in place.--reload-on-fdβ reload if the specified file descriptor is ready.--brutal-reload-on-fdβ brutal reload if the specified file descriptor is ready. π₯--ksmβ enable Linux KSM.--pcre-jitβ enable pcre jit (if available).--never-swapβ lock all memory pages avoiding swapping.
Touch-triggered everything π β poke a file, make uWSGI do a thing. Iconic behavior honestly:
--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-mules-reloadβ reload mules if the specified file is modified/touched.--touch-spoolers-reloadβ reload spoolers 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
Heads up bestie: the option list is still going, so don't close the tab yet π
okay bestie we're back in it, the option buffet continues, hydrate before reading π
--fs-reloadβ the moment the filesystem object you named gets touched, it does a graceful reload π¦ like a polite little refresh--fs-brutal-reloadβ same vibe but brutal π€ filesystem object changes β instant brutal reload, no softness, no chill--fs-signalβ when the filesystem object changes it raises a uwsgi signal. syntax:file signal(yes, both of them, in that order bestie)--check-mountpointβ nukes the instance if a filesystem becomes unreachable. genuinely useful for reliable Fuse management π--mountpoint-checkβ same thing, same energy: instance goes bye if a filesystem is no longer reachable (reliable Fuse management, again)--check-mountβ yep, another twin π destroy the instance when a filesystem is no more reachable (Fuse, reliable, you know the drill)--mount-checkβ the fourth one, same soul: instance destroyed if a filesystem isn't reachable anymore, great for reliable Fuse management πΈ--propagate-touchβ literally described as an over-engineering option for systems with flaky signal management π iconic self-awareness--limit-postβ puts a cap on the request body π«Ά--no-orphansβ workers get auto-killed if master dies. but heads up: this can be dangerous for availability β οΈ--prioβ set the priority of processes/threads--cpu-affinityβ set cpu affinity--post-bufferingβ sets the size in bytes after which it buffers to disk instead of memory πΎ--post-buffering-bufsizeβ sets the buffer size used forread()while in post buffering mode--body-read-warningβ how much memory allocation (in megabytes) for the request body is allowed before it starts printing a warning π’--upload-progressβ turns on creation of.jsonfiles in the directory you specify, while a file upload is happening--no-default-appβ do not fallback to the default app π--manage-script-nameβ automatically rewritesSCRIPT_NAMEandPATH_INFOfor you β¨--ignore-script-nameβ just ignoresSCRIPT_NAMEentirely--catch-exceptionsβ reports the exception as http output. discouraged, use only for testing bestie, i'm serious π¨--reload-on-exceptionβ reloads a worker whenever an exception is raised--reload-on-exception-typeβ reloads a worker when one specific exception type is raised--reload-on-exception-valueβ reloads a worker when a specific exception value is raised--reload-on-exception-reprβ reloads a worker when a specific exception type+value (language-specific) is raised--exception-handlerβ adds an exception handler--enable-metricsβ turns the metrics subsystem on π--metricβ add a custom metric, your own little number, your own little star β--metric-thresholdβ add a metric threshold/alarm π¨--metric-alarmβ also add a metric threshold/alarm (same thing, different name)--alarm-metricβ and again: add a metric threshold/alarm--metrics-dirβ export metrics as text files into the directory you name π--metrics-dir-restoreβ restores the last value taken from the metrics dir--metric-dirβ export metrics as text files to the specified directory (yes, the singular spelling twin)--metric-dir-restoreβ restore last value taken from the metrics dir, singular flavour--metrics-no-coresβ disables generation of cores-related metrics--udpβ run the udp server on the address you give it π‘--statsβ enable the stats server on the specified address--stats-serverβ enable the stats server on the specified address (same, bestie)--stats-httpβ prefixes the stats server json output with http headers π--stats-minifiedβ minifies the statistics json output--stats-minβ minifies the statistics json output (short king behaviour π)--stats-pushβ push the stats json to whatever destination you name--stats-pusher-default-freqβ set the default frequency of stats pushers--stats-pushers-default-freqβ set the default frequency of stats pushers (plural, same deal)--stats-no-coresβ disables generation of cores-related stats--stats-no-metricsβ don't include metrics in the stats output π--multicastβ subscribe to the multicast group you specify--multicast-ttlβ set multicast ttl--multicast-loopβ set multicast loop, default is1π--master-fifoβ enable the master fifo--notify-socketβ enable the notification socket π--subscription-notify-socketβ set the notification socket used for subscriptions--legionβ become a member of a legion π‘οΈ--legion-mcastβ become a member of a legion, but the shortcut for multicast version--legion-nodeβ add a node to a legion--legion-freqβ set the frequency of legion packets--legion-toleranceβ set the tolerance of the legion subsystem--legion-death-on-lord-errorβ declares itself a dead node for however many seconds you say, if one of the lord hooks fails π--legion-skew-toleranceβ set the clock skew tolerance of the legion subsystem, default30seconds β°--legion-lordβ the action to call on Lord election π--legion-unlordβ the action to call on Lord dismiss--legion-setupβ action to call on legion setup--legion-deathβ action to call on legion death (that's the shutdown of the instance, dramatic much π)--legion-joinβ action to call on legion join (the first time quorum is reached)--legion-node-joinedβ action to call when a new node joins the legion π«Ά--legion-node-leftβ action to call when a node leaves the 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 the legion scroll buffer--legion-scroll-list-max-sizeβ set max size of the legion scroll list buffer--subscriptions-sign-checkβ set the digest algorithm and certificate directory for the secured subscription system π--subscriptions-sign-check-toleranceβ set the maximum tolerance (in seconds) of clock skew for the secured subscription system--subscriptions-sign-skip-uidβ skip signature check for the uid you specify when unix sockets credentials are in play--subscriptions-credentials-checkβ add a directory to search for subscriptions key credentials--subscriptions-use-credentialsβ enable management ofSCM_CREDENTIALSin subscriptions UNIX sockets--subscription-algoβ set the load balancing algorithm for the subscription system βοΈ--subscription-dotsplitβ tries to fallback to the next part (dot based) in the subscription key--subscribe-toβ subscribe to the subscription server you specify--stβ subscribe to the specified subscription server (tiny name, big job)--subscribeβ subscribe to the specified subscription server (the classic)--subscribe2β subscribe to the specified subscription server using the advanced keyval syntax β¨--subscribe-freqβ send subscription announce at the interval you set--subscription-toleranceβ set tolerance for subscription servers--unsubscribe-on-graceful-reloadβ forces the unsubscribe request even during a graceful reload--start-unsubscribedβ configure subscriptions but don't actually send them (super handy with master fifo) π€«--subscribe-with-modifier1β force the specified modifier1 when subscribing (typo in the original said "specififed", we're keeping the meaning, bestie)--snmpβ enable the embedded snmp server π--snmp-communityβ set the snmp community string--ssl-verboseβ be verbose about SSL errors, spill the tea π«--ssl-verify-depthβ set maximum certificate verification depth--sniβ add an SNI-governed SSL context--sni-dirβ check forcert/key/client_cafiles in the directory you specify and create a sni/ssl context on demand π--sni-dir-ciphersβ set ssl ciphers for thesni-diroption--ssl-enable3β enable SSLv3. insecure β οΈ--ssl-enable-sslv3β enable SSLv3. insecure, same warning, same yikes--ssl-enable-tlsv1β enable TLSv1. insecure π--ssl-optionβ set a raw ssl option, numeric value only--sni-regexpβ add an SNI-governed SSL context where the key is a regexp π§--ssl-tmp-dirβ store ssl-related temp files in the directory you name--check-intervalβ set the interval, in seconds, of master checks β±οΈ--forkbomb-delayβ sleep for the number of seconds you specify when a forkbomb is detected π£--binary-pathβ force binary path--privileged-binary-patchβ patch the uwsgi binary with a new command, and it happens before the privileges drop--unprivileged-binary-patchβ patch the uwsgi binary with a new command, after the 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 the number of cores you specify β‘--max-fdβ set maximum number of file descriptors. requires root privileges π--logtoβ set the logfile/udp address--logto2β log to the specified file or udp address, but after the privileges drop--log-formatβ set an advanced format for request logging--logformatβ set an advanced format for request logging (the no-dash twin)--logformat-strftimeβ applystrftimeto the logformat output--log-format-strftimeβ applystrftimeto the logformat output (same, dashed up)--logfile-chownβ chown logfiles--logfile-chmodβ chmod logfiles--log-syslogβ log to syslog--log-socketβ send logs to the socket you specify--req-loggerβ set/append a request logger--logger-reqβ set/append a request logger (reordered, same job)--loggerβ set/append a logger--logger-listβ list enabled loggers π--loggers-listβ list enabled loggers (plural version, same list)--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, aka don't show, log lines matching the regexp you give--log-filterβ show only the log lines matching the regexp you give--log-routeβ log to the named logger you specify if the regexp applied on the logline matches--log-req-routeβ log requests to the named logger you specify if the regexp applied on the logline matches--use-abortβ callabort()on segfault/fpe. could be useful for generating a core dump π--alarmβ create a new alarm. syntax:<alarm> <plugin:args>π¨--alarm-cheapβ use the main alarm thread rather than creating dedicated threads for curl-based alarms π
and that's part 4 bestie, we are SO not done, keep scrolling π
--alarm-freqβ tunes the anti-loop alarm system π (default is3seconds, bestie)--alarm-fdβ fire the alarm you name here when an fd is read for read. by default it reads1byte β set8if you're doingeventfdβ¨--alarm-segfaultβ fire the specified alarm when the segmentation fault handler runs π--segfault-alarmβ same thing, different name: fire the specified alarm when the segfault handler runs--alarm-backlogβ fire the specified alarm when the socket backlog queue is full π--backlog-alarmβ fire the specified alarm when the socket backlog queue is full--lq-alarmβ fire the specified alarm when the socket backlog queue is full--alarm-lqβ fire the specified alarm when the socket backlog queue is full--alarm-listen-queueβ fire the specified alarm when the socket backlog queue is full--listen-queue-alarmβ fire the specified alarm when the socket backlog queue is full--log-alarmβ fire the specified alarm when a log line matches the regexp you give it. syntax is literally:<alarm>[,alarm...] <regexp>π--alarm-logβ fire the specified alarm when a log line matches the regexp you give it, syntax:<alarm>[,alarm...] <regexp>--not-log-alarmβ skip the specified alarm when a log line matches the regexp you give it, syntax:<alarm>[,alarm...] <regexp>--not-alarm-logβ skip the specified alarm when a log line matches the regexp you give it, syntax:<alarm>[,alarm...] <regexp>--alarm-listβ list all the enabled alarms π--alarms-listβ list all the enabled alarms--alarm-msg-sizeβ set the max size of an alarm message (default8192)
β¨ LOGGING, BUT MAKE IT EXTRA β¨
--log-masterβ delegate logging to the master process π«Ά--log-master-bufsizeβ set the buffer size for the master logger. bigger log messages will be truncated, so likeβ¦ don't go overboard--log-master-streamβ create the master logpipe asSOCK_STREAM--log-master-req-streamβ create the master requests logpipe asSOCK_STREAM--log-reopenβ reopen the log after a reload π--log-truncateβ truncate the log on startup--log-maxsizeβ set the maximum logfile size--log-backupnameβ set the logfile name to use after rotation--logdateβ prefix your logs with a date, or with astrftimestring πΈ--log-dateβ prefix your logs with a date, or with astrftimestring--log-prefixβ prefix your logs with a string--log-zeroβ log responses that have no body--log-slowβ log any request slower than the number of milliseconds you specify π--log-4xxβ log requests with a4xxresponse--log-5xxβ log requests with a5xxresponse--log-bigβ log requests bigger than the size you specify--log-sendfileβ log sendfile requests--log-ioerrorβ log requests that hit io errors π--log-microsβ report response time in microseconds instead of milliseconds--log-x-forwarded-forβ use the ip from theX-Forwarded-Forheader instead ofREMOTE_ADDR(iykyk)
π PRIVILEGES & DIRECTORIES & LOADING π
--master-as-rootβ leave the master process running as root β οΈ--drop-after-initβ run the privileges drop after plugin initialization. this one is superseded bydrop-after-apps--drop-after-appsβ run the privileges drop after apps loading. this one is superseded bymaster-as-root--force-cwdβ force the initial working directory to the value you give it--binshβ override/bin/sh(it's used by exec hooks, and it always falls back to/bin/sh)--chdirβchdirto the specified directory before apps loading--chdir2βchdirto the 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 the algorithm used for adaptive process spawning--cheaper-stepβ number of additional processes to spawn at each overload--cheaper-overloadβ increase workers after the specified overload--cheaper-algo-listβ list the enabled cheapers algorithms--cheaper-algos-listβ list the enabled cheapers algorithms--cheaper-listβ list the enabled cheapers algorithms--cheaper-rss-limit-softβ don't spawn new workers if the total resident memory usage of all workers goes above this limit--cheaper-rss-limit-hardβ if the total workers resident memory usage is higher, try to stop workers--idleβ set idle mode (put uWSGI into cheap mode after inactivity) ποΈ--die-on-idleβ shutdown uWSGI when it's idle
--mountβ load an application under a mountpoint--worker-mountβ load an application under a mountpoint in the specified worker, or after workers spawn--threadsβ run each worker in prethreaded mode with the number of threads you specify π§΅--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 theSERVER_NAMEvariable)--vhost-hostβ enable virtualhosting mode (based on theHTTP_HOSTvariable)
π ROUTES, ROUTES, AND MORE ROUTES π
--routeβ add a route--route-hostβ add a route based on theHostheader--route-uriβ add a route based onREQUEST_URI--route-qsβ add a route based onQUERY_STRING--route-remote-addrβ add a route based onREMOTE_ADDR--route-user-agentβ add a route based onHTTP_USER_AGENT--route-remote-userβ add a route based onREMOTE_USER--route-refererβ add a route based onHTTP_REFERER--route-labelβ add a routing label (for use withgoto)--route-ifβ add a route based on a condition--route-if-notβ add a route based on a condition (the 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 status you specify--final-route-hostβ add a final route based on theHostheader--final-route-uriβ add a final route based onREQUEST_URI--final-route-qsβ add a final route based onQUERY_STRING--final-route-remote-addrβ add a final route based onREMOTE_ADDR--final-route-user-agentβ add a final route based onHTTP_USER_AGENT--final-route-remote-userβ add a final route based onREMOTE_USER--final-route-refererβ add a final route based onHTTP_REFERER--final-route-labelβ add a final routing label (for use withgoto)--final-route-ifβ add a final route based on a condition--final-route-if-notβ add a final route based on a condition (the 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 status you specify--error-route-hostβ add an error route based on theHostheader--error-route-uriβ add an error route based onREQUEST_URI--error-route-qsβ add an error route based onQUERY_STRING--error-route-remote-addrβ add an error route based onREMOTE_ADDR--error-route-user-agentβ add an error route based onHTTP_USER_AGENT--error-route-remote-userβ add an error route based onREMOTE_USER--error-route-refererβ add an error route based onHTTP_REFERER--error-route-labelβ add an error routing label (for use withgoto)--error-route-ifβ add an error route based on a condition--error-route-if-notβ add an error route based on a condition (the 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 status you specify--response-route-hostβ add a response route based on theHostheader--response-route-uriβ add a response route based onREQUEST_URI--response-route-qsβ add a response route based onQUERY_STRING--response-route-remote-addrβ add a response route based onREMOTE_ADDR--response-route-user-agentβ add a response route based onHTTP_USER_AGENT--response-route-remote-userβ add a response route based onREMOTE_USER--response-route-refererβ add a response route based onHTTP_REFERER--response-route-labelβ add a response routing label (for use withgoto)--response-route-ifβ add a response route based on a condition--response-route-if-notβ add a response route based on a condition (the negate version)--response-route-runβ always run the specified response route action--router-listβ list the enabled routers π--routers-listβ list the enabled routers--error-page-403β add an error page (html) for a managed403response--error-page-404β add an error page (html) for a managed404response--error-page-500β add an error page (html) for a managed500response
π¦ WEBSOCKETS & CHUNKED INPUT & CLOCKS π¦
--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 the websockets ping/pong subsystem--websocket-pong-toleranceβ set the tolerance (in seconds) of the websockets ping/pong subsystem--websockets-max-sizeβ set the max allowed size of websocket messages (in Kbytes, default1024)--websocket-max-sizeβ set the max allowed size of websocket messages (in Kbytes, default1024)--chunked-input-limitβ set the max size of a chunked input part (default1MB, in bytes)--chunked-input-timeoutβ set the default timeout for chunked input--clockβ set a clock source β°--clock-listβ list the enabled clocks--clocks-listβ list the enabled clocks--add-headerβ automatically add HTTP headers to the response β¨--rem-headerβ automatically yeets the specified HTTP header out of the response π--del-headerβ literally the same: auto-removes the specified HTTP header from the response β¨--collect-headerβ stashes the specified response header into a request var (syntax:header var) π--response-header-collectβ same energy: stores the specified response header in a request var (syntax:header var) π¦--pull-headerβ stores the specified response header in a request var and removes it from the response (syntax:header var) π--check-staticβ checks for static files in the directory you name π--check-static-docrootβ checks for static files in the requestedDOCUMENT_ROOTπΈ--static-checkβ checks for static files in the specified directory (yep, same as--check-static) π--static-mapβ maps a mountpoint to a static directory (or file) πΊοΈ--static-map2β like--static-mapbut it completely appends the requested resource to the docroot π§--static-skip-extβ skips the specified extension from static file checks π«--static-indexβ searches for the specified file if a directory is requested π--static-safeβ skips security checks if the file is under the specified path π‘οΈ--static-cache-pathsβ puts resolved paths in the uWSGI cache for the specified amount of seconds β±οΈ--static-cache-paths-nameβ uses the specified cache for static paths πΎ--mimefileβ sets the mime types file path (default/etc/mime.types) π--mime-fileβ same thing: sets the mime types file path (default/etc/mime.types) π--static-expires-typeβ sets theExpiresheader based on content type β³--static-expires-type-mtimeβ sets theExpiresheader based on content type and file mtime π°οΈ--static-expiresβ sets theExpiresheader based on filename regexp π--static-expires-mtimeβ sets theExpiresheader based on filename regexp and file mtime π°οΈ--static-expires-uriβ sets theExpiresheader based onREQUEST_URIregexp π--static-expires-uri-mtimeβ sets theExpiresheader based onREQUEST_URIregexp and file mtime π°οΈ--static-expires-path-infoβ sets theExpiresheader based onPATH_INFOregexp π€οΈ--static-expires-path-info-mtimeβ sets theExpiresheader based onPATH_INFOregexp and file mtime π°οΈ--static-gzipβ if the supplied regexp matches the static file translation, it searches for a gzip version ποΈ--static-gzip-allβ checks for a gzip version of all requested static files π¦--static-gzip-dirβ checks for a gzip version of all requested static files in the specified dir/prefix π--static-gzip-prefixβ same as above: checks for a gzip version of all requested static files in the specified dir/prefix π--static-gzip-extβ checks for a gzip version of all requested static files with the specified ext/suffix π€--static-gzip-suffixβ same: checks for a gzip version of all requested static files with the specified ext/suffix π€--honour-rangeβ enables support for the HTTPRangeheader π--offload-threadsβ sets the number of offload threads to spawn (per-worker, default0) π§΅--offload-threadβ same: sets the number of offload threads to spawn (per-worker, default0) π§΅--file-serve-modeβ sets static file serving mode βοΈ--fileserve-modeβ same: sets static file serving mode βοΈ--disable-sendfileβ disablessendfile()and relies on boringread()/write()π΄--check-cacheβ checks for response data in the specified cache (empty for default cache) π--close-on-execβ sets close-on-exec on connection sockets (could be required for spawning processes in requests) π--close-on-exec2β sets close-on-exec on server 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β tries to remove all of the generated file/sockets π§Ή--file-writeβ writes the specified content to the specified file (syntax:file=value) before privileges drop βοΈ--cgroupβ puts the processes in the specified cgroup π¦--cgroup-optβ sets value in specified cgroup option βοΈ--cgroup-dir-modeβ sets permission for cgroup directory (default is700) π--namespaceβ runs in a new namespace under the specified rootfs π--namespace-keep-mountβ keeps the specified mountpoint in your namespace π--nsβ runs in a new namespace under the specified rootfs (same as--namespace) π--namespace-netβ adds network namespace π--ns-netβ adds network namespace (same) π--enable-proxy-protocolβ enables PROXY1 protocol support (only for http parsers) π§--reuse-portβ enablesREUSE_PORTflag on socket (BSD only) π--tcp-fast-openβ enablesTCP_FASTOPENflag on TCP sockets with the specified qlen value π--tcp-fastopenβ same: enablesTCP_FASTOPENflag on TCP sockets with the specified qlen value π--tcp-fast-open-clientβ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if supported π‘--tcp-fastopen-clientβ same: usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if supported π‘--zergβ attach to a zerg server πΎ--zerg-fallbackβ fallback to normal sockets if the zerg server is not available π--zerg-serverβ enables the zerg server on the specified UNIX socket π--cronβ adds a cron task β°--cron2β adds a cron task (key=val syntax) β°--unique-cronβ adds a unique cron task β°--cron-harakiriβ sets the maximum time (in seconds) we wait for cron command to complete β³--legion-cronβ adds a cron task runnable only when the instance is a lord of the specified legion π--cron-legionβ same: adds a cron task runnable only when the instance is a lord of the specified legion π--unique-legion-cronβ adds a unique cron task runnable only when the instance is a lord of the specified legion π--unique-cron-legionβ same: adds 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β same: list enabled loop engines π--worker-execβ runs the specified command as worker π·--worker-exec2β runs the specified command as worker (afterpost_forkhook) π·--attach-daemonβ attaches a command/daemon to the master process (the command has to not go in background) π--attach-control-daemonβ attaches a command/daemon to the master process (the command has to not go in background), and when the daemon dies, the master dies too π--smart-attach-daemonβ attaches a command/daemon to the master process managed by a pidfile (the command has to daemonize) π§--smart-attach-daemon2β attaches a command/daemon to the master process managed by a pidfile (the command has to NOT daemonize) π§--legion-attach-daemonβ same as--attach-daemonbut the daemon runs only on legion lord node π--legion-smart-attach-daemonβ same as--smart-attach-daemonbut the daemon runs only on legion lord node π--legion-smart-attach-daemon2β same as--smart-attach-daemon2but the daemon runs only on legion lord node π--daemons-honour-stdinβ do not change the stdin of external daemons to/dev/nullπ₯οΈ--attach-daemon2β attach-daemon keyval variant (supports smart modes too) π§--pluginsβ load uWSGI plugins π--pluginβ load uWSGI plugins (same) π--need-pluginsβ load uWSGI plugins (exit on error) πͺ--need-pluginβ load uWSGI plugins (exit on error) (same) πͺ--plugins-dirβ add a directory to uWSGI plugin search path π--plugin-dirβ add a directory to uWSGI plugin search path (same) π--plugins-listβ list enabled plugins π--plugin-listβ list enabled plugins (same) π--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 (fordata://usage) π--printβ simple print π¨οΈ--iprintβ simple print (immediate version) π¨οΈ--exitβ forceexit()of the instance πͺ--cflagsβ report uWSGICFLAGS(useful for building external plugins) π οΈ--dot-hβ dump theuwsgi.hused for building the core (useful for building external plugins) π--config-pyβ dump theuwsgiconfig.pyused for building the core (useful for building external plugins) π--build-pluginβ build a uWSGI plugin for the current binary π¨--versionβ print uWSGI version π·οΈ--response-headers-limitβ set response header maximum size (default:64k) π
And that's a wrap on this whole manual page, bestie! This was for uwsgi_rack_ruby32 version 2.0.24-debian, dated April 2024. You're welcome πβ¨
π¦ where this page comes from
- ubuntu noble: uwsgi-plugin-rack-ruby3.2 2.0.24-2ubuntu10 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms