Files
greptweet/nginx.conf
2014-07-11 14:44:45 +08:00

38 lines
701 B
Nginx Configuration File

# sudo systemctl start php-fpm
# sudo systemctl start nginx
# Tested with Nginx 1.6 on Archlinux
events {
worker_connections 1024;
}
http {
include mime.types;
sendfile on;
server {
server_name greptweet;
root /srv/www/greptweet;
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 ~ \.txt$ {
gzip_static always;
gunzip on;
}
location ~ \.php$ {
try_files $uri = 404;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}
}