add sample config for nginx+uwsgi or lighttpd+fcgi
This commit is contained in:
6
etc/nginx/conf.d/uwsgi-cache.conf
Normal file
6
etc/nginx/conf.d/uwsgi-cache.conf
Normal 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;
|
||||
27
etc/nginx/sites-available/mhapi
Normal file
27
etc/nginx/sites-available/mhapi
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user