Files
greptweet/nginx.conf
Kai Hendry cd1265d3d7 Fix #52
2014-12-04 17:41:45 +08:00

48 lines
885 B
Nginx Configuration File

daemon off;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
sendfile on;
gzip on;
gzip_vary on;
gzip_types application/x-javascript text/css application/javascript text/html application/json;
server {
server_name greptweet.com;
root /srv/http;
charset utf-8;
access_log /srv/http/u/greptweet.access.log;
error_log /srv/http/u/greptweet.error.log;
location / {
index index.php index.html;
rewrite ^/f/(.*)$ /create.php?id=$1 last;
}
location ~ \.(svg|txt)$ {
gzip_static always;
gunzip on;
}
location ~* \.(svg|css|woff|js)$ {
expires 7d;
}
location ~* \.(appcache)$ {
expires 30s;
}
location ~ \.php$ {
try_files $uri = 404;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}
}