UWSGI_PHP(1)
okay so bestie, you typed man uwsgi_php and the terminal handed you the UWSGI_PHP(1) page, filed under User Commands. it is six parts long. we are doing part one together, holding hands, nobody gets left behind. ๐ซถ
โจ NAME โจ
uwsgi_php โ a fast (pure C), self-healing, developer-friendly WSGI server. that's it. that's the whole name section. and honestly? iconic. ๐
โจ SYNOPSIS โจ
uwsgi-core [options...]
โจ DESCRIPTION โจ
so here's the tea: the DESCRIPTION on this page is literally just the options list. every single one of them. so we're going through all of them, in order, no skipping, because i love you and i want you to actually know your server. ๐
๐ the options, all of them, in order ๐
-s,--socketโ bind to the specified UNIX/TCP socket using the default protocol โจ-s,--uwsgi-socketโ bind to the specified UNIX/TCP socket, but speaking the uwsgi protocol--suwsgi-socketโ bind to the specified UNIX/TCP socket, uwsgi protocol over SSL ๐--ssl-socketโ bind to the specified UNIX/TCP socket, uwsgi protocol over SSL (yes, twin descriptions, they're twins)--http-socketโ bind to the specified UNIX/TCP socket using the HTTP protocol--http-socket-modifier1โ force the modifier1 you give it when using the HTTP protocol--http-socket-modifier2โ force the modifier2 you give it when using the HTTP protocol--http11-socketโ bind to the specified UNIX/TCP socket using the HTTP 1.1 (Keep-Alive) protocol--https-socketโ bind to the specified UNIX/TCP socket using the HTTPS protocol ๐--https-socket-modifier1โ force the specified modifier1 when using the HTTPS protocol--https-socket-modifier2โ force the specified modifier2 when using the HTTPS protocol--fastcgi-socketโ bind to the specified UNIX/TCP socket using the FastCGI protocol--fastcgi-nph-socketโ bind to the specified UNIX/TCP socket using the FastCGI protocol (nph mode)--fastcgi-modifier1โ force the specified modifier1 when using the FastCGI protocol--fastcgi-modifier2โ force the specified modifier2 when using the FastCGI protocol--scgi-socketโ bind to the specified UNIX/TCP socket using the SCGI protocol--scgi-nph-socketโ bind to the specified UNIX/TCP socket using the SCGI protocol (nph mode)--scgi-modifier1โ force the specified modifier1 when using the SCGI protocol--scgi-modifier2โ force the specified modifier2 when using the SCGI protocol--raw-socketโ bind to the specified UNIX/TCP socket using the RAW protocol--raw-modifier1โ force the specified modifier1 when using the RAW protocol--raw-modifier2โ force the specified modifier2 when using the RAW protocol--puwsgi-socketโ bind to the specified UNIX/TCP socket using the persistent uwsgi protocol (puwsgi)--protocolโ force the specified protocol for default sockets--socket-protocolโ force the specified protocol for default sockets (twins again, we love consistency)--shared-socketโ create a shared socket for advanced jailing or ipc--undeferred-shared-socketโ create a shared socket for advanced jailing or ipc (undeferred mode)-p,--processesโ spawn the specified number of workers/processes-p,--workersโ spawn the specified number of workers/processes (same short flag, same job, same slay)--thunder-lockโ serializeaccept()usage (if possible) โก-t,--harakiriโ set the harakiri timeout ๐ช--harakiri-verboseโ enable verbose mode for harakiri--harakiri-graceful-timeoutโ the interval between a graceful harakiri attempt and a sigkill--harakiri-graceful-signalโ use this signal instead of sigterm for 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 aliases, one vibe)--backtrace-depthโ set the backtrace depth--mule-harakiriโ set the harakiri timeout for mule tasks-x,--xmlconfigโ load config from an xml file-x,--xmlโ load config from an xml file--configโ load configuration using the pluggable system--fallback-configโ re-exec uwsgi with the specified config 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 specified placeholder, sytax: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 specified num to a list starting from 1)--for-readlineโ (opt logic) for cycle (expand the specified file to 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 the hostname against a regular expression--if-not-hostname-matchโ (opt logic) try to match the 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 options blacklist context--end-blacklistโ clear options blacklist context--whitelistโ set options whitelist context--end-whitelistโ clear options whitelist context--ignore-sigpipeโ do not report (annoying) SIGPIPE--ignore-write-errorsโ do not report (annoying)write()/writev()errors--write-errors-toleranceโ set the maximum number of allowed write errors (default: no tolerance)--write-errors-exception-onlyโ only raise an exception on write errors, giving control to the app itself--disable-write-exceptionโ disable exception generation onwrite()/writev()--inheritโ use the specified file as config template--includeโ include the specified file 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)-d,--daemonizeโ daemonize uWSGI--daemonize2โ daemonize uWSGI after app loading--stopโ stop an instance--reloadโ reload an instance--pauseโ pause an instance--suspendโ suspend an instance--resumeโ resume an instance--connect-and-readโ connect to a socket and wait for data from it--extractโ fetch/dump any supported address to stdout-l,--listenโ set the socket listen queue size-v,--max-varsโ set the amount of internal iovec/vars structures--max-appsโ set the maximum number of per-worker applications-b,--buffer-sizeโ set internal buffer size-m,--memory-reportโ enable memory report--profilerโ enable the specified profiler-c,--cgi-modeโ force CGI-mode for plugins supporting it-a,--abstract-socketโ force UNIX socket in abstract mode (Linux only)-C,--chmod-socketโ chmod-socket-C,--chmodโ chmod-socket--chown-socketโ chown unix sockets--umaskโ set umask--freebindโ put socket in freebind mode--map-socketโ map sockets to specific workers-T,--enable-threadsโ enable threads (stub option this is true by default)--no-threads-waitโ do not wait for threads cancellation on quit/reload--auto-procnameโ automatically set processes name to something meaningful--procname-prefixโ add a prefix to the process names--procname-prefix-spacedโ add a spaced prefix to the process names--procname-appendโ append a string to process names--procnameโ set process names--procname-masterโ set master process name-i,--single-interpreterโ do not use multiple interpreters (where available)--need-appโ exit if no app can be loaded-M,--masterโ enable master process--honour-stdinโ do not remap stdin to/dev/null--emperorโ run the Emperor ๐--emperor-proxy-socketโ force the vassal to became an Emperor proxy--emperor-wrapperโ set a binary wrapper for vassals--emperor-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's... not even the whole page, bestie. we are SO not done. part 2 is coming, drink some water, stretch your wrists. ๐ซถ๐
--emperor-pidfileโ drops the Emperor's pid into the file you name. Emperor bookkeeping, but make it cute โจ--emperor-tyrantโ puts the Emperor into Tyrant mode. Yes bestie, it's literally called that. ๐--emperor-tyrant-nofollowโ in Tyrant mode, don't follow symlinks when it's checking for uid/gid. No sneaky link-following, periodt.--emperor-statsโ spin up the Emperor stats server ๐--emperor-stats-serverโ also spins up the Emperor stats server. Same energy, different spelling. ๐--early-emperorโ spawn the emperor as soon as possible. No waiting around, she's got places to be.--emperor-broodlordโ run the emperor in BroodLord mode. The lore is real, iykyk.--emperor-throttleโ set the throttling level, in milliseconds, for vassals that are behaving badly. Default is1000. Naughty vassals get timed out ๐ซถ--emperor-max-throttleโ the max throttling level, in milliseconds, for bad-behaving vassals. Default is3 minutes. Yes, three whole minutes of timeout. ๐ญ--emperor-magic-execโ prefixes vassals' config files withexec://if they have the executable bit set. Magic โจ literally in the name.--emperor-on-demand-extensionโ search for a text file named vassal name + extension that contains the on-demand socket name.--emperor-on-demand-extโ same thing, shorter name: search for a text file (vassal name + extension) containing the on-demand socket name.--emperor-on-demand-directoryโ turns on on-demand mode, binding to the unix socket in the directory you specify, named like the vassal +.socket.--emperor-on-demand-dirโ the short version of the above: on-demand mode, unix socket in the specified directory, named vassal +.socket.--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โ lets the Emperor accept the extension you specify (the vassal gets called with--config).--emperor-extra-extโ same deal, abbreviated: allow the specified extension in the Emperor, and the vassal gets called with--config.--emperor-no-blacklistโ turns the Emperor blacklisting subsystem all the way off ๐ซ--emperor-use-cloneโ useclone()instead offork(), passing theunshare()flags you specify.--emperor-graceful-shutdownโ vassals get a graceful shutdown during ragnarok. Yes, ragnarok. We don't make the rules. ๐ฅ--emperor-capโ set vassals capability.--vassals-capโ set vassals capability. (Same thing, another alias, bestie.)--vassal-capโ set vassals capability. Third one. She's thorough.--imperial-monitor-listโ list the enabled imperial monitors ๐--imperial-monitors-listโ list the enabled imperial monitors (plural version, same list).--vassals-inheritโ add config templates to vassals' config (it uses--inherit).--vassals-includeโ include config templates into vassals' config (it uses--includeinstead of--inherit).--vassals-inherit-beforeโ add config templates to vassals' config using--inherit, and it parses them before the vassal file.--vassals-include-beforeโ include config templates into vassals' config using--includeinstead of--inherit, and it parses them before the vassal file.--vassals-start-hookโ run the command you specify before each vassal starts ๐--vassals-stop-hookโ run the specified command after a vassal's death. RIP little vassal ๐ฏ๏ธ--vassal-sosโ the vassal asks the emperor for reinforcements when it's overloaded. SOS bestie!! ๐--vassal-sos-backlogโ ask the emperor for an 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: automatically set the specified option via--setfor every vassal.--heartbeatโ announce healthiness to the emperor. Just letting her know we're thriving ๐--reload-mercyโ the maximum time, in seconds, that we wait for workers and other processes to die during reload/shutdown.--worker-reload-mercyโ the maximum time, in seconds, a worker can take to reload/shutdown. Default is60.--mule-reload-mercyโ the maximum time, in seconds, a mule can take to reload/shutdown. Default is60.--exit-on-reloadโ force exit even if a reload was 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. (Yes,-his listed twice. That's just how she is.)--print-symโ print the content of the binary symbol you specify.--print-symbolโ print the content of the specified binary symbol.-r|--reaperโ callwaitpid(-1,...)after each request to get rid of zombies ๐ง No zombie apocalypse on our watch.-R|--max-requestsโ reload workers after the specified amount of managed requests.--max-requests-deltaโ add(worker_id * delta)to themax_requestsvalue of each worker.--min-worker-lifetimeโ the number of seconds a worker has to run before it can be reloaded. Default is10.--max-worker-lifetimeโ reload workers after the specified number of seconds. 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 specified number of shared locks ๐--lock-engineโ set the lock engine.--ftokโ set the ipcsem key viaftok()so you avoid duplicates.--persistent-ipcsemโ don't remove ipcsem's on shutdown. They stay. Iconic clingy behaviour.-A|--sharedareaโ create a raw shared memory area of the specified number of pages. Note: it supports keyval too ๐--safe-fdโ do not close the file descriptor you specify.--fd-safeโ do not close the specified file descriptor. (Same thing, flipped name, we love consistency /j)--cacheโ create a shared cache containing the given elements.--cache-blocksizeโ set the cache blocksize.--cache-storeโ enable persistent cache to disk ๐พ--cache-store-syncโ set the sync frequency for the persistent cache.--cache-no-expireโ disable the auto sweep of expired items.--cache-expire-freqโ set how often the cache sweeper scans. Default is3 seconds.--cache-report-freed-itemsโ constantly report the cache items freed by the sweeper. > Use this only for debug, bestie, it's chatty.--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 entire 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 into the cache.--load-file-in-cache-gzipโ load a static file into the cache, with gzip compression.--cache2โ create a new-generation shared cache (keyval syntax).--queueโ enable the shared queue.--queue-blocksizeโ set the queue blocksize.--queue-storeโ enable persistent queue to disk.--queue-store-syncโ set the sync frequency for the persistent queue.-Q|--spoolerโ run a spooler on the directory you specify ๐--spooler-externalโ map spooler 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 specified directory before each spooler task.--spooler-processesโ set the number of processes for spoolers.--spooler-quietโ don't be verbose about spooler tasks ๐คซ--spooler-max-tasksโ the maximum number of tasks to run before recycling a spooler.--spooler-harakiriโ set the harakiri timeout for spooler tasks.--spooler-frequencyโ set the spooler frequency.--spooler-freqโ set the spooler frequency. (Short version, same vibe.)--muleโ add a mule.--mulesโ add the specified number of mules.--farmโ add a mule farm. Mules with friends ๐ด--mule-msg-sizeโ set the mule message buffer size.--signalโ send a uWSGI signal to a server.--signal-bufsizeโ set the buffer size for the signal queue.--signals-bufsizeโ set the buffer size for the signal queue. (Plural edition.)--signal-timerโ add a timer. Syntax:<signal> <seconds>.--timerโ add a timer. Syntax:<signal> <seconds>. โฐ--signal-rbtimerโ add a redblack timer. Syntax:<signal> <seconds>.--rbtimerโ add a redblack timer. Syntax:<signal> <seconds>.--rpc-maxโ maximum number of rpc slots. Default is64.-L|--disable-loggingโ disable request logging. Silence, but make it fashion.--flockโ lock the file you specify before starting, and exit if it's locked.--flock-waitโ lock the specified file before starting, and wait if it's locked.--flock2โ lock the specified file after logging/daemon setup, and exit if it's locked.--flock-wait2โ lock the specified file after logging/daemon setup, and wait if it's locked.--pidfileโ create a pidfile (before privileges drop).--pidfile2โ create a pidfile (after privileges drop).--safe-pidfileโ create a safe pidfile (before privileges drop).--safe-pidfile2โ create a 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 specified directories. Again: new_root and put_old must be separated by a space.--uidโsetuidto the specified user/uid.--gidโsetgidto the specified group/gid.--add-gidโ add the specified group id to the process credentials.--immediate-uidโsetuidto the specified user/uid IMMEDIATELY. No chill, right now ๐โโ๏ธ--immediate-gidโsetgidto the specified group/gid IMMEDIATELY.--no-initgroupsโ disable the additional groups that get set viainitgroups().--capโ set process capability.--unshareโunshare()part of the processes and put them in a new namespace.--unshare2โunshare()part of the processes and put them in a new namespace, but after the rootfs change.--setns-socketโ expose a unix socket that returns namespace fds from/proc/self/ns.--setns-socket-skipโ skip the specified entry when sending setns file descriptors.--setns-skipโ skip the specified entry when sending setns file descriptors. (Shorter spelling, same skip.)--setnsโ join a namespace that was created by an external uWSGI instance.--setns-preopenโ open/proc/self/nsas soon as possible and cache the fds. Speedy โจ--jailedโ mark the instance as jailed (force the execution ofpost_jailhooks) ๐--reforkโfork()again after privileges drop. useful for jailing systems ๐ฆ--re-forkโfork()again after privileges drop. useful for jailing systems โจ--refork-as-rootโfork()again before privileges drop. useful for jailing systems ๐--re-fork-as-rootโfork()again before privileges drop. useful for jailing systems ๐ซถ--refork-post-jailโfork()again after jailing. useful for jailing systems ๐ธ--re-fork-post-jailโfork()again after jailing. useful for jailing systems ๐--hook-asapโ run the specified hook as soon as possible โก--hook-pre-jailโ run the specified hook before jailing ๐--hook-post-jailโ run the specified hook after jailing ๐--hook-in-jailโ run the specified hook in jail after initialization ๐--hook-as-rootโ run the specified hook before privileges drop ๐--hook-as-userโ run the specified hook after privileges drop ๐--hook-as-user-atexitโ run the specified hook before app exit and reload ๐ช--hook-pre-appโ run the specified hook before app loading ๐ฆ--hook-post-appโ run the specified hook after app loading ๐ฌ--hook-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 for wait-for-interface โณ--wait-interfaceโ wait for the specified network interface to come up before running root hooks ๐ถ--wait-interface-timeoutโ set the timeout for wait-for-interface โณ--wait-for-ifaceโ wait for the specified network interface to come up before running root hooks ๐--wait-for-iface-timeoutโ set the timeout for wait-for-interface โณ--wait-ifaceโ wait for the specified network interface to come up before running root hooks ๐ถ--wait-iface-timeoutโ set the timeout for wait-for-interface โณ--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 for wait-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 for wait-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โ <orange>disable deferred-accept on sockets</orange> ๐ซ--tcp-nodelayโ enable TCP NODELAY on each request ๐--so-keepaliveโ enable TCP KEEPALIVEs ๐--so-send-timeoutโ set SO_SNDTIMEO โณ--socket-send-timeoutโ set SO_SNDTIMEO โณ--so-write-timeoutโ set SO_SNDTIMEO โณ--socket-write-timeoutโ set SO_SNDTIMEO โณ--socket-sndbufโ set SO_SNDBUF ๐ค--socket-rcvbufโ set SO_RCVBUF ๐ฅ--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โ ping a signal the moment the file you named gets modified/touched. syntax:file signalโจ--fs-reloadโ when the filesystem object you point at changes, do a graceful reload ๐ฆ--fs-brutal-reloadโ same vibe, but make it brutal ๐ reload when that filesystem object changes--fs-signalโ raise a uwsgi signal when the specified filesystem object gets modified. syntax:file signal--check-mountpointโ if a filesystem stops being reachable, the instance just destroys itself. Lowkey iconic for reliable Fuse management ๐ง--mountpoint-checkโ literally the same thing bestie: filesystem unreachable โ instance destroyed. (reliable Fuse management energy)--check-mountโ yep, same again. filesystem gone = instance gone. Fuse management stay winning โจ--mount-checkโ the fourth twin ๐ฏ destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)--propagate-touchโ the most over-engineering option ever for systems with flaky signal management ๐ญ no cap, that's what it says--limit-postโ cap the request body, periodt.--no-orphansโ workers get killed automatically if the master dies.
careful bestie โ this one can be dangerous for availability ๐
--prioโ set the priority of processes/threads ๐--cpu-affinityโ set the cpu affinity (pin those babies down)--post-bufferingโ set the size in bytes after which the body buffers to disk instead of memory--post-buffering-bufsizeโ set the buffer size used forread()when you're in post buffering mode ๐ฆ--body-read-warningโ set how much memory allocation (in megabytes) is allowed for a request body before it starts printing a warning at you ๐--upload-progressโ turn 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. no safety net, we're free ๐--manage-script-nameโ automatically rewritesSCRIPT_NAMEandPATH_INFOfor you โจ--ignore-script-nameโ ignoreSCRIPT_NAMEentirely ๐--catch-exceptionsโ report the exception as http output.
discouraged!! use only for testing, fr fr ๐งช
--reload-on-exceptionโ a worker raises an exception โ that worker gets reloaded ๐--reload-on-exception-typeโ reload a worker when a specific exception type gets raised ๐ฏ--reload-on-exception-valueโ reload a worker when a specific exception value gets raised--reload-on-exception-reprโ reload a worker when a specific exception type+value (language-specific, iykyk) gets raised--exception-handlerโ add an exception handler ๐ซถ--enable-metricsโ turn on the metrics subsystem ๐--metricโ add a custom metric, make it yours ๐--metric-thresholdโ add a metric threshold/alarm ๐จ--metric-alarmโ add a metric threshold/alarm (same energy, different name)--alarm-metricโ add a metric threshold/alarm ๐จ (third twin, we love a trio)--metrics-dirโ export metrics as text files into the directory you name ๐--metrics-dir-restoreโ restore the last value taken from the metrics dir ๐ง--metric-dirโ export metrics as text files to the specified directory (yes, singular spelling, still the same deal)--metric-dir-restoreโ restore last value taken from the metrics dir โจ--metrics-no-coresโ stop generating 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 (identical twin moment)--stats-httpโ prefix the stats server json output with http headers ๐--stats-minifiedโ minify that statistics json output โ๏ธ--stats-minโ minify statistics json output (same thing, shorter name, main character energy)--stats-pushโ push the stats json to whatever destination you specify ๐--stats-pusher-default-freqโ set the default frequency of stats pushers โฐ--stats-pushers-default-freqโ set the default frequency of stats pushers (plural, same vibe)--stats-no-coresโ disable generation of cores-related stats--stats-no-metricsโ do not include metrics in the stats output ๐--multicastโ subscribe to the multicast group you name ๐ก--multicast-ttlโ set the 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โ become a member of a legion ๐--legion-mcastโ become 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 the legion subsystem--legion-death-on-lord-errorโ if one of the lord hooks fails, declare itself as a dead node for the number of seconds you specify ๐--legion-skew-toleranceโ set the clock skew tolerance of the 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 a new node joining 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 the max size of the legion scroll buffer--legion-scroll-list-max-sizeโ set the 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 the signature check for the uid you specify when 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 the load balancing algorithm for the subscription system โ๏ธ--subscription-dotsplitโ try 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 (the short one, so cute)--subscribeโ subscribe to the specified subscription server--subscribe2โ subscribe to the specified subscription server using advanced keyval syntax โจ--subscribe-freqโ send the subscription announce at the interval you set โฐ--subscription-toleranceโ set tolerance for subscription servers--unsubscribe-on-graceful-reloadโ force the unsubscribe request even during a graceful reload ๐--start-unsubscribedโ configure subscriptions but do NOT send them (handy with master fifo) ๐คซ--subscribe-with-modifier1โ force the specified modifier1 when subscribing--snmpโ enable the embedded snmp server ๐ฒ--snmp-communityโ set the snmp community string--ssl-verboseโ be verbose about SSL errors ๐ฃ๏ธ--ssl-verify-depthโ set the maximum certificate verification depth ๐--sniโ add an SNI-governed SSL context ๐--sni-dirโ check forcert/key/client_cafile 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!! we said what we said ๐
--ssl-enable-sslv3โ enable SSLv3
insecure again, bestie, be so serious ๐
--ssl-enable-tlsv1โ enable TLSv1
insecure ๐จ
--ssl-optionโ set a raw ssl option (numeric value, no quotes about it)--sni-regexpโ add an SNI-governed SSL context (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โ when a forkbomb is detected, sleep for the number of seconds you specify ๐ด--binary-pathโ force the 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 the number of cores you specify โก--max-fdโ set the maximum number of file descriptors (requires root privileges) ๐--logtoโ set logfile/udp address ๐--logto2โ log to the specified file or udp address after privileges drop--log-formatโ set an advanced format for request logging ๐จ--logformatโ set advanced format for request logging (same, shorter, iconic)--logformat-strftimeโ applystrftimeto the logformat output ๐ฐ๏ธ--log-format-strftimeโ applystrftimeto logformat output--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 (same thing, different order, we love her)--loggerโ set/append a logger ๐ชต--logger-listโ list the enabled loggers ๐--loggers-listโ list enabled loggers (plural, still slaying)--threaded-loggerโ offload the 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 do not show) log lines matching the regexp you give ๐ณ๏ธ--log-filterโ show only the log lines matching the specified regexp ๐--log-routeโ log to the named logger you specify if the regexp applied on the logline matches ๐ฏ--log-req-routeโ log requests to the specified named logger 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โ bestie, this makes curl-based alarms use the main alarm thread instead of spawning a whole dedicated thread per alarm. less thread drama, more chill ๐--alarm-freqโ tunes the anti-loop alarm system. the default is3seconds, so likeโฆ don't go feral with it ๐ซถ--alarm-fdโ raise the alarm you name when an fd is read for read. by default it reads1byte, so if you're on eventfd, set it to8. iykyk โจ--alarm-segfaultโ raise the specified alarm whenever the segmentation fault handler runs. yes, the ๐ handler. at least you'll get notified.--segfault-alarmโ literally the same thing as--alarm-segfault: raise the specified alarm when the segmentation fault handler is executed. two names, one vibe.--alarm-backlogโ raise the specified alarm when the socket backlog queue is full. the queue said "no more" and the alarm said "heard" ๐--backlog-alarmโ same energy, same option: raise the specified alarm when the socket backlog queue is full.--lq-alarmโ yep, another alias: raise the specified alarm when the socket backlog queue is full.--alarm-lqโ and another one, bestie: raise the specified alarm when the socket backlog queue is full.--alarm-listen-queueโ the backlog queue is full โ raise the specified alarm. (this family is huge, it's giving family reunion ๐)--listen-queue-alarmโ once again for the people in the back: raise the specified alarm when the socket backlog queue is full.--log-alarmโ raise the specified alarm when a log line matches the specified regexp. syntax is<alarm>[,alarm...] <regexp>โ note the comma-separated alarm list, slay ๐--alarm-logโ the alias twin ๐ raise the specified alarm when a log line matches the specified regexp. syntax:<alarm>[,alarm...] <regexp>--not-log-alarmโ the opposite girly: skip the specified alarm when a log line matches the specified regexp. syntax:<alarm>[,alarm...] <regexp>--not-alarm-logโ same as above, different spelling โจ skip the specified alarm when a log line matches the specified regexp, syntax<alarm>[,alarm...] <regexp>--alarm-listโ just lists all the enabled alarms. a little roster reveal ๐--alarms-listโ the plural-flavoured twin: list enabled alarms.--alarm-msg-sizeโ sets the max size of an alarm message. default is8192. keep your alarm messages from becoming whole novels ๐--log-masterโ delegate the logging to the master process. let the master handle it, periodt.--log-master-bufsizeโ sets the buffer size for the master logger. bigger log messages will be truncated, soโฆ choose wisely bestie ๐ญ--log-master-streamโ creates the master logpipe asSOCK_STREAM. sockets but streamy ๐--log-master-req-streamโ creates the master requests logpipe asSOCK_STREAM. same but for the requests one โจ--log-reopenโ reopen the log after a reload. fresh log, fresh me ๐ธ--log-truncateโ truncate the log on startup. blank slate energy, no cap.--log-maxsizeโ set the maximum logfile size. that's your cap, fr fr.--log-backupnameโ set the logfile name used after rotation. rotated logs deserve a name too ๐ซถ--logdateโ prefix logs with a date or a strftime string. timestamps, iconic.--log-dateโ the alias: prefix logs with a date or a strftime string.--log-prefixโ prefix logs with a string of your choosing. custom flair for every line โจ--log-zeroโ log responses that have no body. empty but documented ๐--log-slowโ log requests slower than the specified number of milliseconds. slow and steady gets logged ๐ข--log-4xxโ log requests with a4xxresponse. client said something goofy, we're noting it ๐--log-5xxโ log requests with a5xxresponse. server had a moment, we're noting that too ๐ญ--log-bigโ log requests bigger than the specified size. big requests, big receipts ๐ฅ--log-sendfileโ log sendfile requests. yes, all of them.--log-ioerrorโ log requests with io errors. the messy ones get logged too ๐--log-microsโ report response time in microseconds instead of milliseconds. precision era โญ--log-x-forwarded-forโ use the ip from theX-Forwarded-Forheader instead ofREMOTE_ADDR. proxy girlies, this one's for you ๐--master-as-rootโ leave the master process running asroot. big power, big responsibility ๐--drop-after-initโ run the privileges drop after plugin initialization. note: it's superseded bydrop-after-apps. so like, know that.--drop-after-appsโ run the privileges drop after apps loading. this one is superseded bymaster-as-root. chain of command, bestie ๐ซก--force-cwdโ force the initial working directory to the specified value. your cwd, your rules โจ--binshโ override/bin/sh. it's used by exec hooks, and it always fallback to/bin/shโ so no matter what you do, that's the safety net ๐ซถ--chdirโ chdir to the specified directory before apps loading.--chdir2โ chdir to the specified directory after apps loading. same thing, different timing โฐ--lazyโ set lazy mode (load apps in workers instead of master). delegation, but make it processes ๐--lazy-appsโ load apps in each worker instead of the master. every worker gets its own copy, main character energy ๐--cheapโ set cheap mode (spawn workers only after the first request). why work before anyone asks? ๐ด--cheaperโ set cheaper mode (adaptive process spawning). workers appear when needed, it's giving โจadaptiveโจ--cheaper-initialโ set the initial number of processes to spawn in cheaper mode. your starting lineup ๐--cheaper-algoโ choose the algorithm used for adaptive process spawning. pick your fighter ๐ฅ--cheaper-stepโ number of additional processes to spawn at each overload. overloaded? here's more hands ๐ค--cheaper-overloadโ increase workers after the specified overload. the threshold where we start hiring ๐--cheaper-algo-listโ list enabled cheapers algorithms. little directory of options ๐ฆ--cheaper-algos-listโ same thing, plural-coded: list enabled cheapers algorithms.--cheaper-listโ also lists enabled cheapers algorithms. three names, one job ๐--cheaper-rss-limit-softโ don't spawn new workers if the total resident memory usage of all workers is higher than this limit. a gentle nudge, not a hard stop ๐ธ--cheaper-rss-limit-hardโ if total workers resident memory usage is higher, try to stop workers. this one means business ๐ค--idleโ set idle mode (put uWSGI in cheap mode after inactivity). nap time for your processes ๐ด--die-on-idleโ shutdown uWSGI when idle. not a nap, a full goodbye ๐--mountโ load application under mountpoint. plop that app right where you want it ๐ซถ--worker-mountโ load application under mountpoint in the specified worker or after workers spawn. same, but worker-scoped โจ--threadsโ run each worker in prethreaded mode with the specified number of threads. thread army, assemble ๐งต--thread-stacksizeโ set threads stacksize.--threads-stacksizeโ set threads stacksize. (alias behavior, same deal ๐ )--thread-stack-sizeโ set threads stacksize. the hyphenated remix โจ--threads-stack-sizeโ set threads stacksize. four names for one setting, that's so uWSGI of it ๐--vhostโ enable virtualhosting mode (based on theSERVER_NAMEvariable). many hosts, one process ๐--vhost-hostโ enable virtualhosting mode (based on theHTTP_HOSTvariable). same vibe, different variable ๐--routeโ add a route. welcome to routing era ๐ฃ๏ธ--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). yes bestie, there's a goto ๐--route-ifโ add a route based on condition.--route-if-notโ add a route based on condition (negate version). the "if not" twin ๐--route-runโ always run the specified route action. no conditions, just vibes โจ--final-routeโ add a final route. the last word ๐ค--final-route-statusโ add a final route for the specified status.--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 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. for when things go sideways ๐ญ--error-route-statusโ add an error route for the specified status.--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 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. routing but for the reply ๐--response-route-statusโ add a response route for the specified status.--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 condition.--response-route-if-notโ add a response route based on condition (negate version).--response-route-runโ always run the specified response route action.--router-listโ list enabled routers. the router census ๐ฆ--routers-listโ same but plural: list enabled routers.--error-page-403โ add an error page (html) for the managed403response. pretty page for the forbidden moment โจ--error-page-404โ add an error page (html) for the managed404response. your custom "not found" serve ๐--error-page-500โ add an error page (html) for the managed500response. soft landing for the server's bad day ๐ญ--websockets-ping-freqโ set the frequency (in seconds) of websockets automatic ping packets. ping ping ping ๐--websocket-ping-freqโ same setting, singular-named twin: set the frequency (in seconds) of websockets automatic ping packets.--websockets-pong-toleranceโ set the tolerance (in seconds) of the websockets ping/pong subsystem. how long you'll wait for the pong ๐ซถ--websocket-pong-toleranceโ the alias: 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). cap those messages bestie ๐--websocket-max-sizeโ same numbers, singular spelling: 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). chunk responsibly ๐งฉ--chunked-input-timeoutโ set default timeout for chunked input. no waiting around forever โณ--clockโ set a clock source. timekeeping, but make it configurable โฐ--clock-listโ list enabled clocks. see all your time sources lined up ๐ธ--clocks-listโ lists every clock that's currently enabled. a lil inventory moment โจ--add-headerโ automatically adds HTTP headers to the response. you don't lift a finger, they just appear ๐--rem-headerโ automatically removes the HTTP header you specify from the response.--del-headerโ same job, same energy: automatically removes the specified HTTP header from the response. (two names, one destiny ๐ซถ)--collect-headerโ stores the response header you name into a request var. syntax:header var--response-header-collectโ also stores the specified response header in a request var. syntax:header var--pull-headerโ stores the specified response header in a request var and yanks it out of the response entirely. syntax:header varit's giving "you can look but you can't keep it" ๐ญ
--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. (yes bestie, this is the same thing wearing a different outfit โจ)--static-mapโ maps a mountpoint to a static directory (or a file).--static-map2โ like--static-map, except it completely appends the requested resource to the docroot.--static-skip-extโ skips the specified extension when doing staticfile checks.--static-indexโ searches for the file you specify when a directory is requested.--static-safeโ skips security checks if the file lives under the specified path. handle with care, bestie โ this one's the "trust me bro" of paths ๐จ--static-cache-pathsโ puts resolved paths into the uWSGI cache for the number of seconds you specify. speedrun energy ๐ฅ--static-cache-paths-nameโ uses the cache you specify for those 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(twins ๐)--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. the mtime variants are just the glow-up versions fr fr โจ
--static-gzipโ if the regexp you supply matches the static file translation, it'll go looking for a gzip version. zip zip hooray ๐ฆ--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 inside the dir/prefix you specify.--static-gzip-prefixโ checks for a gzip version of all requested static files inside the specified dir/prefix.--static-gzip-extโ checks for a gzip version of all requested static files with the ext/suffix you specify.--static-gzip-suffixโ checks for a gzip version of all requested static files with the specified ext/suffix. (dir/prefix and ext/suffix are each just two names for one vibe ๐)--honour-rangeโ enables support for the HTTPRangeheader. resumable downloads said hello ๐--offload-threadsโ sets how many offload threads to spawn. per-worker, default0--offload-threadโ sets how many offload threads to spawn. per-worker, default0same same ๐ซถ--file-serve-modeโ sets the static file serving mode.--fileserve-modeโ sets the static file serving mode. (told you, same same ๐)--disable-sendfileโ disablessendfile()and relies on the boring oldread()/write(). not everything needs to be fast, sometimes it needs to be boring ๐--check-cacheโ checks for response data in the cache you specify. leave it empty for the default cache. โจ--close-on-execโ sets close-on-exec on connection sockets. this could be required if you're spawning processes inside requests.--close-on-exec2โ sets close-on-exec on server sockets. also could be required for spawning processes in requests.--modeโ sets a uWSGI custom mode.--envโ sets an environment variable.--envdirโ loads a daemontools compatible envdir.--early-envdirโ loads a daemontools compatible envdir ASAP. like, immediately immediately ๐--unenvโ unsets an environment variable.--vacuumโ tries to remove all of the generated file/sockets. leave no trace, main character behaviour ๐ธ--file-writeโ writes the specified content to the specified file before privileges drop. syntax:file=value--cgroupโ puts the processes into the cgroup you specify.--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 rootfs you specify.--namespace-keep-mountโ keeps the mountpoint you specify inside your namespace.--nsโ runs in a new namespace under the specified rootfs. (yes, it's--namespaceagain, they're matching ๐)--namespace-netโ adds a network namespace.--ns-netโ adds a network namespace. iconic duo behaviour โจ
--enable-proxy-protocolโ enablesPROXY1protocol support. only for http parsers.--reuse-portโ enables theREUSE_PORTflag on the socket. BSD only, bestie ๐จ--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 specified qlen value. twinning ๐ซ--tcp-fast-open-clientโ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if it's supported.--tcp-fastopen-clientโ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if supported. same, obviously ๐ซถ--zergโ attaches to a zerg server. ๐--zerg-fallbackโ falls back to normal sockets if the zerg server isn't available. safety net activated ๐ธ๏ธ--zerg-serverโ enables the zerg server on the UNIX socket you specify.--cronโ adds a cron task.--cron2โ adds a cron task using key=val syntax.--unique-cronโ adds a unique cron task.--cron-harakiriโ sets the maximum time (in seconds) we wait for a cron command to complete. yes bestie, harakiri means it gets killed ๐--legion-cronโ adds a cron task that's runnable only when the instance is a lord of the legion you specify. ๐--cron-legionโ 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โ adds a unique cron task runnable only when the instance is a lord of the specified legion. four names, one very lordly vibe ๐--loopโ selects the uWSGI loop engine.--loop-listโ lists every enabled loop engine.--loops-listโ lists every enabled loop engine. (plural, same list ๐)--worker-execโ runs the command you specify 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 (again, the command has to not go in background), and when the daemon dies, the master dies too. ride or die, literally ๐จ--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. opposite day ๐--legion-attach-daemonโ same as--attach-daemon, but the daemon only runs on the legion lord node. ๐--legion-smart-attach-daemonโ same as--smart-attach-daemon, but the daemon only runs on the legion lord node. ๐--legion-smart-attach-daemon2โ same as--smart-attach-daemon2, but the daemon only runs on the legion lord node. ๐--daemons-honour-stdinโ does not change the stdin of external daemons to/dev/null. let them have stdin, as a treat ๐--attach-daemon2โ the attach-daemon keyval variant. it supports smart modes too. โจ
--pluginsโ loads uWSGI plugins.--pluginโ loads uWSGI plugins. same thing, one less letter ๐--need-pluginsโ loads uWSGI plugins, but exits on error. no plugin, no party ๐ญ--need-pluginโ loads uWSGI plugins and exits on error. yep, the singular twin ๐ซถ--plugins-dirโ adds a directory to the uWSGI plugin search path.--plugin-dirโ adds a directory to the uWSGI plugin search path. same same ๐ธ--plugins-listโ lists every enabled plugin.--plugin-listโ lists every enabled plugin. (plural, same list, we been knew ๐ )--autoloadโ tries to automatically load plugins whenever unknown options show up. โจ mind reading mode โจ--dlopenโ blindly loads a shared library. blindly!! no cap, that's the actual word ๐ฅ--allowed-modifiersโ a 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. every single one bestie, buckle up ๐ซถ--show-configโ shows the current config, reformatted as ini.--binary-append-dataโ returns the content of a resource to stdout so you can append it to a uwsgi binary. fordata://usage.--printโ simple print.--iprintโ simple print, but the immediate version. โก--exitโ forcesexit()of the instance. the dramatic exit ๐๐--cflagsโ reports uWSGI CFLAGS. 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. the classic ๐--response-headers-limitโ sets the response header maximum size. default:64k
and that's the whole list bestie, you ate that ๐ฝ๏ธโจ this page was uwsgi_php version 2.0.31-2, dated January 2026 โ go forth and configure, you absolute icon ๐
๐ฆ
๐ฆ where this page comes from
- ubuntu resolute: uwsgi-plugin-php 2.0.31+2+0.0.15build9 ยท GPL-3.0-or-later
- ubuntu stonking: uwsgi-plugin-php 2.0.31+2+0.0.15build9 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms