57 lines
1.5 KiB
Nginx Configuration File
57 lines
1.5 KiB
Nginx Configuration File
user www-data;
|
|
worker_processes 1;
|
|
pid /var/run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
server_tokens off;
|
|
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
gzip on;
|
|
gzip_disable "msie6";
|
|
|
|
# Unless these are set explicitly, the types_hash_bucket_size is set at
|
|
# runtime depending on the processor's cache line size, which can (and does)
|
|
# cause inconsistent behaviour on different hardware. Our
|
|
# /etc/nginx/mime.types requires at least a 32 bit bucket, but we set these to
|
|
# the latest nginx default values to be on the safe size.
|
|
types_hash_bucket_size 64;
|
|
types_hash_max_size 1024;
|
|
|
|
proxy_cache_path /var/cache/nginx/proxycache levels=1:2 keys_zone=cache:30m max_size=250m;
|
|
proxy_temp_path /var/cache/nginx/proxytemp 1 2;
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
server_name _;
|
|
|
|
client_max_body_size 100M;
|
|
|
|
location / {
|
|
proxy_pass http://ckan:80/;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Server $host;
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header Host $host;
|
|
proxy_cache cache;
|
|
proxy_cache_bypass $cookie_auth_tkt;
|
|
proxy_no_cache $cookie_auth_tkt;
|
|
proxy_cache_valid 30m;
|
|
proxy_cache_key $host$scheme$proxy_host$request_uri;
|
|
}
|
|
}
|
|
}
|