-
Notifications
You must be signed in to change notification settings - Fork 0
nginx configuration
Alexander Groshev edited this page Aug 31, 2014
·
1 revision
Sample configuration file for mojo-twist:
upstream blog {
server localhost:5000;
}
server {
listen 80;
server_name server.tld;
access_log /var/log/nginx/$host;
gzip on;
gzip_proxied any;
gzip_types text/css text/plain text/xml application/xml application/javascript application/x-javascript text/javascript application/json text/x-json;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
expires 1w;
add_header Cache-Control public;
location / {
proxy_read_timeout 60;
proxy_pass http://blog;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-HTTPS 0;
proxy_set_header X-Real-IP $remote_addr;
}
location ~* \.(css|js|woff|map|ico|png)$ {
root /usr/share/nginx/mojo-twist/public;
expires max;
add_header Cache-Control public;
add_header Cache-Control proxy-revalidate;
}
}