parent
2730e46f52
commit
7020f0378d
@ -0,0 +1,15 @@
|
|||||||
|
# This assumes mod_fastcgi is already enabled by other config and
|
||||||
|
# that the git repository is checked out in /var/www. Change as
|
||||||
|
# needed.
|
||||||
|
fastcgi.server += ( "/mhapi/" =>
|
||||||
|
((
|
||||||
|
"bin-path" => "/var/www/monster-hunter-scripts/bin/mhapi_fcgi.py",
|
||||||
|
"socket" => "/var/run/lighttpd/fcgi-mhapi.socket",
|
||||||
|
"check-local" => "disable",
|
||||||
|
"min-procs" => 1,
|
||||||
|
"max-procs" => 10,
|
||||||
|
"bin-environment" => (
|
||||||
|
"PYTHONPATH" => "/var/www/monster-hunter-scripts",
|
||||||
|
),
|
||||||
|
))
|
||||||
|
)
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
# Cache in the tmpfs filesystem for speed, max 50m (out of 100mb total)
|
||||||
|
|
||||||
|
uwsgi_cache_path /run/uwsgi/app/cache
|
||||||
|
keys_zone=mhapi:10m
|
||||||
|
max_size=50m;
|
||||||
|
uwsgi_temp_path /run/uwsgi/app/tmp;
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name HOSTNAME;
|
||||||
|
|
||||||
|
root STATICROOT;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location /mhapi/ {
|
||||||
|
uwsgi_pass unix:///run/uwsgi/app/mhapi/mhapi.socket;
|
||||||
|
include uwsgi_params;
|
||||||
|
uwsgi_param UWSGI_SCHEME $scheme;
|
||||||
|
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||||
|
uwsgi_cache mhapi;
|
||||||
|
uwsgi_cache_key $request_uri;
|
||||||
|
uwsgi_cache_valid 200 302 1h;
|
||||||
|
uwsgi_cache_valid 301 1d;
|
||||||
|
uwsgi_cache_valid any 1m;
|
||||||
|
uwsgi_cache_min_uses 1;
|
||||||
|
uwsgi_cache_use_stale error timeout invalid_header http_500;
|
||||||
|
}
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_disable "msie6";
|
||||||
|
gzip_min_length 500;
|
||||||
|
gzip_proxied no-store no-cache private expired auth;
|
||||||
|
gzip_types text/plain text/css application/json;
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
[uwsgi]
|
||||||
|
plugin = python
|
||||||
|
socket = /run/uwsgi/app/mhapi/mhapi.socket
|
||||||
|
|
||||||
|
pythonpath = /PATH/TO/monster-hunter-scripts/
|
||||||
|
module = mhapi.web.wsgi:application
|
||||||
|
|
||||||
|
master = yes
|
||||||
|
processes = 4
|
||||||
|
harakiri = 60
|
||||||
|
reload-mercy = 8
|
||||||
|
cpu-affinity = 1
|
||||||
|
stats = /tmp/stats.socket
|
||||||
|
max-requests = 2000
|
||||||
|
limit-as = 512
|
||||||
|
reload-on-as = 256
|
||||||
|
reload-on-rss = 192
|
||||||
|
no-orphans = yes
|
||||||
|
vacuum = yes
|
||||||
Loading…
Reference in new issue