add sample config for nginx+uwsgi or lighttpd+fcgi

This commit is contained in:
Bryce Allen
2015-03-20 21:37:31 -05:00
parent 2730e46f52
commit 7020f0378d
4 changed files with 67 additions and 0 deletions

View File

@@ -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;

View File

@@ -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;
}