Files
greptweet/nginx.conf
2014-10-15 10:35:01 +00:00

44 lines
840 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 /var/log/nginx/greptweet.access.log;
error_log /var/log/nginx/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 ~ \.php$ {
try_files $uri = 404;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}
}