UWSGI_ROUTER_ACCESS(1)
๐ NAME ๐
okay so bestie, pull up a chair, because this is the manual page for uwsgi_router_access โ and if you're squinting at the title and wondering why it says UWSGI_ROUTER_ACCESS(1) up there, that's just the manual-name-meets-the-program-name situation every man page does. Same girl, two name tags. ๐
uwsgi_router_access โ fast (pure C), self-healing, developer-friendly WSGI server
pure C. self-healing. developer-friendly. she's literally serving WSGI and vibes at the same time. ๐ซถโจ
heads up bestie, this page is LONG (like, six parts long), so pace yourself. hydrate. we're going through every single flag, no skips, no summarising, periodt. ๐ธ
๐ซถ SYNOPSIS ๐ซถ
uwsgi-core [options...]
that's it. that's the whole thing. you run the thing, you give it options, she does stuff. main character energy fr fr. ๐
โจ DESCRIPTION โจ
so this whole section is basically a massive options menu โ sockets first, then all the switches and knobs and levers. every single one of them is here, in order, no cap. ๐ฅ
๐ Sockets & protocols
-s,--socketโ bind to the UNIX or TCP socket you specify, using the default protocol. ๐-s,--uwsgi-socketโ bind to the UNIX or TCP socket you specify, but this time using the uwsgi protocol. (yes,-sis on both of them, the letters get reused around here, it's a whole thing ๐)--suwsgi-socketโ bind to the UNIX or TCP socket you specify, using uwsgi protocol over SSL. ๐--ssl-socketโ bind to the UNIX or TCP socket you specify, using uwsgi protocol over SSL. (yes it's twins with the one above, the manpage said it twice so I'm saying it twice ๐)--http-socketโ bind to the UNIX or TCP socket you specify, using the HTTP protocol. โจ--http-socket-modifier1โ force the modifier1 you specify when you're using HTTP protocol.--http-socket-modifier2โ force the modifier2 you specify when you're using HTTP protocol.--http11-socketโ bind to the UNIX or TCP socket you specify, using HTTP 1.1 (Keep-Alive) protocol. staying connected, so iconic. ๐ฆ--https-socketโ bind to the UNIX or TCP socket you specify, using HTTPS protocol. ๐--https-socket-modifier1โ force the modifier1 you specify when you're using HTTPS protocol.--https-socket-modifier2โ force the modifier2 you specify when you're using HTTPS protocol.--fastcgi-socketโ bind to the UNIX or TCP socket you specify, using the FastCGI protocol. โก--fastcgi-nph-socketโ bind to the UNIX or TCP socket you specify, using the FastCGI protocol (nph mode).--fastcgi-modifier1โ force the modifier1 you specify when you're using FastCGI protocol.--fastcgi-modifier2โ force the modifier2 you specify when you're using FastCGI protocol.--scgi-socketโ bind to the UNIX or TCP socket you specify, using the SCGI protocol.--scgi-nph-socketโ bind to the UNIX or TCP socket you specify, using the SCGI protocol (nph mode).--scgi-modifier1โ force the modifier1 you specify when you're using SCGI protocol.--scgi-modifier2โ force the modifier2 you specify when you're using SCGI protocol.--raw-socketโ bind to the UNIX or TCP socket you specify, using the RAW protocol.--raw-modifier1โ force the modifier1 you specify when you're using RAW protocol.--raw-modifier2โ force the modifier2 you specify when you're using RAW protocol.--puwsgi-socketโ bind to the UNIX or TCP socket you specify, using persistent uwsgi protocol (puwsgi). she persists. ๐--protocolโ force the protocol you specify for default sockets.--socket-protocolโ force the protocol you specify for default sockets. (yep, same job as the one above, the manpage keeps both, so we keep both ๐ซถ)--shared-socketโ create a shared socket for advanced jailing or ipc.--undeferred-shared-socketโ create a shared socket for advanced jailing or ipc, but in undeferred mode.
๐งต Workers, harakiri & the queue
-p,--processesโ spawn the number of workers/processes you specify.-p,--workersโ spawn the number of workers/processes you specify. (same-p, same meaning, the page just names it twice and I respect that ๐ )--thunder-lockโ serializeaccept()usage, if possible. โก-t,--harakiriโ set the harakiri timeout. (dramatic name, very on brand ๐ก๏ธ)--harakiri-verboseโ enable verbose mode for harakiri.--harakiri-graceful-timeoutโ the interval between a graceful harakiri attempt and asigkill. ๐ญ--harakiri-graceful-signalโ use this signal instead ofsigtermfor graceful harakiri attempts.--harakiri-queue-thresholdโ only trigger harakiri if the queue is greater than this threshold.--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. (three ways to say the same thing, and honestly? slay, options are a love language ๐)--backtrace-depthโ set the backtrace depth.--mule-harakiriโ set the harakiri timeout for mule tasks.
๐ Config, placeholders & the option logic
-x,--xmlconfigโ load config from an xml file.-x,--xmlโ load config from an xml file. (yes,-xtwice. iconic behaviour. ๐)--configโ load configuration using the pluggable system.--fallback-configโ re-exec uwsgi with the config you specify when the exit code is 1.--strictโ enable strict mode (placeholder cannot be used). โ ๏ธ--skip-zeroโ skip the check of file descriptor 0.--skip-atexitโ skip atexit hooks (ignored by the master).--skip-atexit-teardownโ skip atexit teardown (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.--declare-option2โ declare a new uWSGI custom option (non-immediate).--resolveโ place the result of a dns query in the placeholder you specify, syntax:placeholder=name(immediate option).--forโ(opt logic)for cycle. ๐--for-globโ(opt logic)for cycle, expand glob.--for-timesโ(opt logic)for cycle, expand the number you specify into a list starting from 1.--for-readlineโ(opt logic)for cycle, expand the file you specify into a list of lines.--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-hostnameโ(opt logic)check for hostname.--if-not-hostnameโ(opt logic)check for hostname.--if-hostname-matchโ(opt logic)try to match hostname against a regular expression.--if-not-hostname-matchโ(opt logic)try to match hostname against a regular expression.--if-existsโ(opt logic)check for file/directory existence.--if-not-existsโ(opt logic)check for file/directory existence.--ifexistsโ(opt logic)check for file/directory existence.--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 existence.--if-not-fileโ(opt logic)check for file existence.--if-dirโ(opt logic)check for directory existence.--if-not-dirโ(opt logic)check for directory existence.--ifdirโ(opt logic)check for directory existence.--if-directoryโ(opt logic)check for directory existence.--endifโ(opt logic)end if.--end-ifโ(opt logic)end if.--blacklistโ set the options blacklist context.--end-blacklistโ clear the options blacklist context.--whitelistโ set the options whitelist context.--end-whitelistโ clear the options whitelist context.
๐ฉน Write errors & warnings
--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 onwrite()/writev().
๐๏ธ Templating & config files
--inheritโ use the file you specify as a config template.--includeโ include the file you specify as immediate configuration.--inject-beforeโ inject a text file before the config file (advanced templating).--inject-afterโ inject a text file after the config file (advanced templating).
๐๏ธ Instance control
-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.
๐งฎ Buffers, listen queue & memory
-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 the internal buffer size.-m,--memory-reportโ enable the memory report. ๐--profilerโ enable the profiler you specify.-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. (-Con both, we love a shared letter ๐ )--chown-socketโ chown unix sockets.--umaskโ set the umask.--freebindโ put the socket in freebind mode.--map-socketโ map sockets to specific workers.
๐ง Threads & process names
-T,--enable-threadsโ enable threads (stub option, this is true by default). ๐งต--no-threads-waitโ do not wait for threads cancellation on quit/reload.--auto-procnameโ automatically set process names 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 the master process name.
๐ Apps, master & the Emperor
-i,--single-interpreterโ do not use multiple interpreters (where available).--need-appโ exit if no app can be loaded. ๐ญ-M,--masterโ enable the master process.--honour-stdinโ do not remapstdinto/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-wrapper-overrideโ set a binary wrapper for vassals to try before the default one.--emperor-wrapper-fallbackโ set a binary wrapper for vassals to try as a last resort.--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. ๐
and that is NOT the end bestie, don't you dare close the tab โ this page comes in 6 parts and we're only on part 1. so much more to go. stay hydrated, keep scrolling. ๐ฆโจ
--emperor-pidfileโ drop the Emperor's pid into the file you name. king energy only โจ--emperor-tyrantโ flip the Emperor into Tyrant mode ๐--emperor-tyrant-nofollowโ in Tyrant mode, when it's checking uid/gid, don't follow symlinks. no cap.--emperor-statsโ run the Emperor stats server ๐--emperor-stats-serverโ also runs the Emperor stats server (same vibe, different spelling bestie)--early-emperorโ spawn the emperor as soon as possible. literally the moment it can. โก--emperor-broodlordโ run the emperor in BroodLord mode ๐ฆ--emperor-throttleโ set the throttling level (in milliseconds) for vassals that are acting up. default is1000.--emperor-max-throttleโ set the max throttling level (in milliseconds) for bad-behaving vassals. default is3 minutes. they get the timeout corner fr ๐--emperor-magic-execโ prefix vassals' config files withexec://if they have the executable bit set ๐ช--emperor-on-demand-extensionโ search for a text file (vassal name + extension) that holds the on demand socket name--emperor-on-demand-extโ same thing, shorter name, we love a shortcut ๐--emperor-on-demand-directoryโ turn on on demand mode by binding to the unix socket in the directory you specify, named like the vassal +.socket--emperor-on-demand-dirโ the abbreviated twin of the above ๐--emperor-on-demand-execโ use the output of the command you specify as the on demand socket name (the vassal name gets passed as the only argument)--emperor-extra-extensionโ allows the extension you specify in the Emperor (and the vassal gets called with--config)--emperor-extra-extโ yep, the short version of that one too โจ--emperor-no-blacklistโ disable the Emperor blacklisting subsystem. everyone gets a second chance ig ๐ซถ--emperor-use-cloneโ useclone()instead offork(), passing theunshare()flags you specify--emperor-graceful-shutdownโ use vassals' graceful shutdown during ragnarok ๐--emperor-capโ set vassals capability--vassals-capโ set vassals capability (same deal)--vassal-capโ set vassals capability (also same deal, three aliases, iconic)--imperial-monitor-listโ list the enabled imperial monitors ๐--imperial-monitors-listโ list the enabled imperial monitors (the plural version, equally valid)--vassals-inheritโ add config templates to vassals' config (it uses--inherit)--vassals-includeโ include config templates in vassals' config (uses--includeinstead of--inherit)--vassals-inherit-beforeโ add config templates to vassals' config (uses--inherit, and parses before the vassal file)--vassals-include-beforeโ include config templates in vassals' config (uses--includeinstead of--inherit, and parses before the vassal file)--vassals-start-hookโ run the command you specify before each vassal starts ๐--vassals-stop-hookโ run the command you specify after a vassal's death ๐ชฆ--vassal-sosโ ask the emperor for reinforcement when you're overloaded. help bestie I'm drowning ๐ญ--vassal-sos-backlogโ ask the emperor for sos if the backlog queue has more items than the value you specify--vassals-setโ automatically set the option you specify (via--set) for every single vassal--vassal-setโ same thing, singular spelling, still sets it 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 is60.--mule-reload-mercyโ set the maximum time (in seconds) a mule can take to reload/shutdown. default is60.--exit-on-reloadโ force exit even if a reload is requested--die-on-termโ exit instead of doing a brutal reload onSIGTERM--force-gatewayโ force the spawn of the first registered gateway without a master
-h|--helpโ show this help-h|--usageโ show this help (again, same flag, we keep it real)--print-symโ print the content of the binary symbol you specify--print-symbolโ print the content of the binary symbol you specify (full-name edition)-r|--reaperโ callwaitpid(-1,...)after each request to get rid of zombies ๐งโโ๏ธ no zombies allowed in this house-R|--max-requestsโ reload workers after the amount of managed requests you specify--max-requests-deltaโ add(worker_id * delta)to themax_requestsvalue of each worker--min-worker-lifetimeโ number of seconds a worker must run before being reloaded. default is10.--max-worker-lifetimeโ reload workers after the amount of seconds you specify. default is disabled.--max-worker-lifetime-deltaโ add(worker_id * delta)seconds to themax_worker_lifetimevalue of each worker-z|--socket-timeoutโ set the internal sockets timeout--no-fd-passingโ disable file descriptor passing--locksโ create the number of shared locks you specify--lock-engineโ set the lock engine--ftokโ set the ipcsem key viaftok()for avoiding duplicates--persistent-ipcsemโ do not remove ipcsem's on shutdown-A|--sharedareaโ create a raw shared memory area of the specified pages (heads up: it supports keyval too)--safe-fdโ do not close the file descriptor you specify--fd-safeโ do not close the file descriptor you specify (same energy, reversed words)
--cacheโ create a shared cache containing the given elements--cache-blocksizeโ set cache blocksize--cache-storeโ enable persistent cache to disk--cache-store-syncโ set the frequency of sync for the persistent cache--cache-no-expireโ disable the auto sweep of expired items--cache-expire-freqโ set the frequency of cache sweeper scans. default is3 seconds.--cache-report-freed-itemsโ constantly report the cache item freed by the sweeper. โ ๏ธ use only for debug, bestie, this is a loud one--cache-udp-serverโ bind the cache udp server (used only for set/update/delete) to the socket you specify--cache-udp-nodeโ send cache update/deletion to the cache udp server you specify--cache-syncโ copy the whole content of another uWSGI cache server on server startup--cache-use-last-modifiedโ update thelast_modified_attimestamp 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 the frequency of sync for the persistent queue
-Q|--spoolerโ run a spooler on the directory you specify ๐--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 the directory you specify 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--spooler-frequencyโ set spooler frequency--spooler-freqโ set spooler frequency (short edition, same vibe)--muleโ add a mule ๐ด--mulesโ add the number of mules you specify--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 (plural spelling, same thing)--signal-timerโ add a timer. syntax:<signal> <seconds>โฐ--timerโ add a timer. syntax:<signal> <seconds>(faster to type, same deal)--signal-rbtimerโ add a redblack timer. syntax:<signal> <seconds>--rbtimerโ add a redblack timer. syntax:<signal> <seconds>(short king)--rpc-maxโ maximum number of rpc slots. default:64.-L|--disable-loggingโ disable request logging ๐
--flockโ lock the file you specify before starting, and exit if it's locked--flock-waitโ lock the file you specify before starting, and wait if it's locked ๐ฐ๏ธ--flock2โ lock the file you specify after logging/daemon setup, exit if it's locked--flock-wait2โ lock the file you specify after logging/daemon setup, wait if it's locked--pidfileโ create pidfile (before privileges drop)--pidfile2โ create pidfile (after privileges drop)--safe-pidfileโ create safe pidfile (before privileges drop)--safe-pidfile2โ create safe pidfile (after privileges drop)--chrootโchroot()to the directory you specify--pivot-rootโpivot_root()to the directories you specify (new_root and put_old must be separated with a space)--pivot_rootโpivot_root()to the directories you specify (new_root and put_old must be separated with a space โ yes, underscore spelling, it's a whole thing)--uidโsetuidto the user/uid you specify--gidโsetgidto the group/gid you specify--add-gidโ add the group id you specify to the process credentials--immediate-uidโsetuidto the user/uid you specify IMMEDIATELY. no waiting around ๐--immediate-gidโsetgidto the group/gid you specify IMMEDIATELY--no-initgroupsโ disable the additional groups set viainitgroups()--capโ set process capability--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 the rootfs change--setns-socketโ expose a unix socket returning namespace fds from/proc/self/ns๐ช--setns-socket-skipโ skip the entry you specify when sending setns file descriptors--setns-skipโ skip the entry you specify when sending setns file descriptors (short version, same skip)--setnsโ join a namespace created by an external uWSGI instance--setns-preopenโ open/proc/self/nsas soon as possible and cache the fds--jailedโ marks the instance as jailed, which forces the execution ofpost_jailhooks. periodt. ๐ซถ--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. it's giving instant. โก--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-post-forkโ run the specified hook after each fork. ๐ด--hook-acceptingโ run the specified hook after each worker enter the accepting phase. ๐--hook-accepting1โ run the specified hook after the first worker enters the accepting phase. 1๏ธโฃ--hook-accepting-onceโ run the specified hook after each worker enter 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 send a stop message. ๐--hook-emperor-reloadโ run the specified hook when the Emperor send 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. ๐ช--after-request-hookโ run the specified function/symbol after each request. ๐ฅ--after-request-callโ run the specified function/symbol after each request. ๐ค--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 beforeexec()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 beforeexec()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 beforeexec()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 forwait-for-interface. โณ--wait-interfaceโ wait for the specified network interface to come up before running root hooks. ๐ถ--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. โณ--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 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. ๐--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. ๐--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โ 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. ๐--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. ๐--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-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โ pings a signal when the file you picked gets modified/touched, bestie. syntax isfile signal๐ซถ--fs-reloadโ graceful reload when the specified filesystem object gets modified โจ--fs-brutal-reloadโ brutal reload when the specified filesystem object gets modified ๐ no chill, no waiting--fs-signalโ raise a uwsgi signal when the specified filesystem object gets modified, syntax:file signal๐--check-mountpointโ straight up destroys the instance if a filesystem is no more reachable. like, it's giving reliability for Fuse management ๐--mountpoint-checkโ same energy, bb: destroys the instance if a filesystem is no more reachable (useful for reliable Fuse management) ๐ธ--check-mountโ yep, again: destroys the instance if a filesystem is no more reachable (useful for reliable Fuse management) ๐--mount-checkโ the fourth twin ๐ destroys the instance if a filesystem is no more reachable (useful for reliable Fuse management)--propagate-touchโ the over-engineering option for systems with flaky signal management, no cap ๐--limit-postโ limit request body, periodt โ--no-orphansโ automatically kill workers if master dies. can be dangerous for availability though, so be careful bestie ๐ญ--prioโ set processes/threads priority โญ--cpu-affinityโ set cpu affinity ๐--post-bufferingโ set size in bytes after which it'll buffer to disk instead of memory ๐--post-buffering-bufsizeโ set buffer size forread()in post buffering mode ๐--body-read-warningโ set the amount of allowed memory allocation (in megabytes) for request body before it starts printing a warning ๐--upload-progressโ enable creation of.jsonfiles in the specified directory during a file upload ๐--no-default-appโ do not fallback to default app ๐ซ--manage-script-nameโ automatically rewriteSCRIPT_NAMEandPATH_INFOโจ--ignore-script-nameโ ignoreSCRIPT_NAME๐--catch-exceptionsโ report exception as http output. discouraged, use only for testing, fr fr ๐งช--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 (same thing, different name, iykyk) ๐จ--alarm-metricโ add a metric threshold/alarm โ yeah, three of them ๐--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 (singular edition) ๐--metric-dir-restoreโ restore last value taken from the metrics dir โป๏ธ--metrics-no-coresโ disable generation of cores-related metrics ๐ซ--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 โฑ๏ธ--stats-no-coresโ disable generation of cores-related stats ๐ซ--stats-no-metricsโ do not include metrics in stats output ๐--multicastโ subscribe to specified multicast group ๐ป--multicast-ttlโ set multicast ttl โณ--multicast-loopโ set multicast loop (default1) ๐--master-fifoโ enable the master fifo ๐--notify-socketโ enable the notification socket ๐--subscription-notify-socketโ set the notification socket for subscriptions ๐--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-death-on-lord-errorโ declare itself as a dead node for the specified amount of seconds if one of the lord hooks fails ๐--legion-skew-toleranceโ set the clock skew tolerance of legion subsystem (default60seconds) โฐ--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 โฐ--subscriptions-sign-skip-uidโ skip signature check for the specifieduidwhen using unix sockets credentials ๐ชช--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 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 (yes, the short one) ๐จ--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 ๐ช--start-unsubscribedโ configure subscriptions but do not send them (useful with master fifo) ๐คซ--subscribe-with-modifier1โ force the specififedmodifier1when subscribing (typo is theirs, not mine, bestie ๐ญ) ๐ ๏ธ--snmpโ enable the embedded snmp server ๐ก--snmp-communityโ set the snmp community string ๐ค--ssl-verboseโ be verbose about SSL errors ๐ฃ๏ธ--ssl-verify-depthโ set maximum certificate verification depth ๐ณ๏ธ--sniโ add an SNI-governed SSL context ๐--sni-dirโ check forcert/key/client_cafile in the specified directory and create a sni/ssl context on demand ๐--sni-dir-ciphersโ set ssl ciphers forsni-diroption ๐ก--ssl-enable3โ enable SSLv3 (insecure) ๐--ssl-enable-sslv3โ enable SSLv3 (insecure) ๐--ssl-enable-tlsv1โ enable TLSv1 (insecure) ๐--ssl-optionโ set a raw ssl option (numeric value) ๐ข--sni-regexpโ add an SNI-governed SSL context (the key is a regexp) ๐งฉ--ssl-tmp-dirโ store ssl-related temp files in the specified directory ๐๏ธ--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โ applystrftimeto logformat output ๐ฐ๏ธ--log-format-strftimeโ applystrftimeto logformat output ๐ฐ๏ธ--logfile-chownโchownlogfiles ๐--logfile-chmodโchmodlogfiles ๐--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โ callabort()on segfault/fpe, could be useful for generating a core dump ๐ฅ--alarmโ create a new alarm, syntax:<alarm> <plugin:args>๐จ
Okay bestie the alarm options are giving โจsecurity systemโจ and honestly? obsessed.
--alarm-cheapโ use the main alarm thread instead of spinning up dedicated threads for curl-based alarms--alarm-freqโ tune the anti-loop alarm system (default3seconds)--alarm-fdโ raise the specified alarm when an fd is read for read (by default it reads1byte, set8foreventfd) ๐ซถ--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 (yes bestie, same thing, different name, iconic twin energy)--alarm-backlogโ raise the specified alarm when the socket backlog queue is full--backlog-alarmโ raise the specified alarm when the socket backlog queue is full--lq-alarmโ raise the specified alarm when the socket backlog queue is full--alarm-lqโ raise the specified alarm when the socket backlog queue is full--alarm-listen-queueโ raise the specified alarm when the socket backlog queue is full--listen-queue-alarmโ raise the specified alarm when the socket backlog queue is full
the backlog alarm has six whole aliases and honestly? she's serving versatility. pick whichever one your heart says ๐
--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>(the "nah, not today" version)--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 (default8192)
Now we're deep in logging territory and it's lowkey the most underrated glow-up in the whole config. โจ
--log-masterโ delegate logging to master process ๐--log-master-bufsizeโ set the buffer size for the master logger. bigger log messages will be truncated (not it, keep your lines short bestie)--log-master-streamโ create the master logpipe asSOCK_STREAM--log-master-req-streamโ create the master requests logpipe asSOCK_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 astrftimestring--log-dateโ prefix logs with date or astrftimestring--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 a4xxresponse--log-5xxโ log requests with a5xxresponse--log-bigโ log requests bigger than the specified size--log-sendfileโ log sendfile requests--log-ioerrorโ log requests with io errors--log-microsโ report response time in microseconds instead of milliseconds--log-x-forwarded-forโ use the ip fromX-Forwarded-Forheader instead ofREMOTE_ADDR
--master-as-rootโ leave master process running as root--drop-after-initโ run privileges drop after plugin initialization, superseded bydrop-after-apps--drop-after-appsโ run privileges drop after apps loading, superseded bymaster-as-root
heads up bestie โ those last two are literally marked superseded, so they're the vintage pieces in your closet, not the fit you reach for ๐
--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
Okay the lazy / cheap / cheaper family is my roman empire actually. ๐ธ
--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 onSERVER_NAMEvariable)--vhost-hostโ enable virtualhosting mode (based onHTTP_HOSTvariable)
And nowโฆ the routing section. It's long. It's ornate. It's the main character. Let's go. ๐
--routeโ add a route--route-hostโ add a route based onHostheader--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 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 onHostheader--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 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 onHostheader--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 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 onHostheader--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 condition--response-route-if-notโ add a response route based on condition (negate version)--response-route-runโ always run the specified response route action
four whole route families โ plain,final,error,responseโ and every single one has the same glorious list of triggers. symmetry, she is beauty ๐ฆ
--router-listโ list enabled routers--routers-listโ list enabled routers--error-page-403โ add an error page (html) for managed403response--error-page-404โ add an error page (html) for managed404response--error-page-500โ add an error page (html) for managed500response
Websockets bestie rise up ๐ (and yes, every one of these has a twin name, that's just how this house runs):
--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, 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 default timeout for chunked input--clockโ set a clock source โฐ--clock-listโ list enabled clocks
and that's a wrap on part 5, but bestie we are NOT done โ there's more coming ๐ซถ
--clocks-listโ lists every clock that's enabled rn ๐ฐ๏ธ--add-headerโ automatically slaps HTTP headers onto the response for u ๐--rem-headerโ automatically yeets the specified HTTP header out of the response--del-headerโ automatically yeets the specified HTTP header out of the response--collect-headerโ stashes the specified response header into a request var (syntax:header var) ๐ฅ--response-header-collectโ stashes the specified response header into a request var (syntax:header var)--pull-headerโ stashes the specified response header into 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 directory you name--static-mapโ maps a mountpoint to a static directory (or a file) ๐บ๏ธ--static-map2โ likestatic-mapbut it completely appends the requested resource to the docroot--static-skip-extโ skips the specified extension when doing static-file checks--static-indexโ searches for the specified file when a directory gets requested--static-safeโ skips security checks if the file lives under the specified path ๐--static-cache-pathsโ pops resolved paths into the uWSGI cache for the number of seconds you give--static-cache-paths-nameโ use the specified cache for static paths--mimefileโ sets the mime types file path (default/etc/mime.types)--mime-fileโ 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 a filename regexp--static-expires-mtimeโ sets theExpiresheader based on a filename regexp and file mtime--static-expires-uriโ sets theExpiresheader based on aREQUEST_URIregexp--static-expires-uri-mtimeโ sets theExpiresheader based on aREQUEST_URIregexp and file mtime--static-expires-path-infoโ sets theExpiresheader based on aPATH_INFOregexp--static-expires-path-info-mtimeโ sets theExpiresheader based on aPATH_INFOregexp and file mtime--static-gzipโ if the regexp you supplied matches the static file translation, it'll go hunting for a gzip version ๐๏ธ--static-gzip-allโ checks for a gzip version of every single requested static file--static-gzip-dirโ checks for a gzip version of all requested static files in the specified dir/prefix--static-gzip-prefixโ 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โ checks for a gzip version of all requested static files with the specified ext/suffix--honour-rangeโ turns on support for the HTTPRangeheader ๐--offload-threadsโ sets how many offload threads to spawn (per-worker, default0)--offload-threadโ sets how many offload threads to spawn (per-worker, default0)--file-serve-modeโ sets the static file serving mode--fileserve-modeโ sets the static file serving mode--disable-sendfileโ disablessendfile()and makes it rely on boring oldread()/write()๐ด--check-cacheโ checks for response data in the specified cache (leave it empty for the 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โ loads a daemontools compatible envdir--early-envdirโ loads a daemontools compatible envdir ASAP ๐โโ๏ธ--unenvโ unsets an 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 a value in the specified cgroup option--cgroup-dir-modeโ sets permission for the 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--namespace-netโ adds a network namespace--ns-netโ adds a network namespace--enable-proxy-protocolโ enablesPROXY1protocol support (only for http parsers)--reuse-portโ enables theREUSE_PORTflag on the socket (BSD only) ๐ก--tcp-fast-openโ enables theTCP_FASTOPENflag on TCP sockets with the qlen value you specify--tcp-fastopenโ enables theTCP_FASTOPENflag on TCP sockets with the qlen value you specify--tcp-fast-open-clientโ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if it's supported--tcp-fastopen-clientโ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if it's supported--zergโ attaches to a zerg server ๐พ--zerg-fallbackโ falls back to normal sockets if the zerg server isn't 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 the cron command to complete--legion-cronโ adds a cron task that's only runnable when the instance is a lord of the specified legion ๐--cron-legionโ adds a cron task that's only runnable when the instance is a lord of the specified legion--unique-legion-cronโ adds a unique cron task that's only runnable when the instance is a lord of the specified legion--unique-cron-legionโ adds a unique cron task that's only runnable when the instance is a lord of the specified legion--loopโ select the uWSGI loop engine ๐--loop-listโ lists the enabled loop engines--loops-listโ lists the enabled loop engines--worker-execโ runs the specified command as a worker--worker-exec2โ runs the specified command as a worker (after thepost_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); 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 the legion lord node--legion-smart-attach-daemonโ same as--smart-attach-daemonbut the daemon runs only on the legion lord node--legion-smart-attach-daemon2โ same as--smart-attach-daemon2but the daemon runs only on the legion lord node--daemons-honour-stdinโ don't change the stdin of external daemons to/dev/null--attach-daemon2โ the attach-daemon keyval variant (supports smart modes too)
--pluginsโ loads uWSGI plugins ๐งฉ--pluginโ loads uWSGI plugins--need-pluginsโ loads uWSGI plugins (and exits on error)--need-pluginโ loads uWSGI plugins (and exits on error)--plugins-dirโ adds a directory to the uWSGI plugin search path--plugin-dirโ adds a directory to the uWSGI plugin search path--plugins-listโ lists the enabled plugins--plugin-listโ lists the enabled plugins--autoloadโ tries to automatically load plugins when unknown options show up--dlopenโ blindly loads a shared library ๐--allowed-modifiersโ comma separated list of allowed modifiers--remap-modifierโ remaps a request modifier from one id to another--dump-optionsโ dumps the full list of available options--show-configโ shows the current config reformatted as ini--binary-append-dataโ returns 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โ reports uWSGICFLAGS(useful for building external plugins)--dot-hโ dumps theuwsgi.hused for building the core (useful for building external plugins)--config-pyโ dumps theuwsgiconfig.pyused for building the core (useful for building external plugins)--build-pluginโ builds a uWSGI plugin for the current binary--versionโ prints the uWSGI version--response-headers-limitโ sets the response header maximum size (default:64k)
and that's a wrap bestie, the whole options list ate and left no crumbs ๐ โจ
tiny lil' footnote so u know where this came from: this isuwsgi_router_accessfrom the2.0.31-debianera, dated July 2026, sectionUWSGI_ROUTER_ACCESS(1)of the manual. stay iconic, go read your man pages, mwah ๐๐ฆ๐
๐ฆ where this page comes from
- ubuntu stonking: uwsgi-plugin-router-access 2.0.31-6build1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms