[uwsgi] ; load the required plugins, php is loaded as the default (0) modifier plugins = http,0:php ; bind the http router to port 80 http = :8080 ; leave the master running as root (to allows bind on port 80) master = true master-as-root = true ; drop privileges uid = nobody gid = nogroup ; our working dir project_dir = /var/www ; chdir to it (just for fun) chdir = %(project_dir) ; check for static files in it check-static = %(project_dir) ; ...but skip .php and .inc extensions static-skip-ext = .php static-skip-ext = .inc ; search for index.html when a dir is requested static-index = index.html ; jail our php environment to project_dir php-docroot = %(project_dir) ; and search for index.php and index.inc if required php-index = index.php php-index = index.inc ; set php timezone php-set = date.timezone=Asia/Shanghai ; disable uWSGI request logging disable-logging = true ; use a max of 10 processes processes = 4 ; ...but start with only 2 and spawn the others on demand cheaper = 2