mirror of
https://github.com/thewesker/greptweet.git
synced 2025-12-20 12:11:05 -05:00
Our nginx configuration
This commit is contained in:
37
nginx.conf
Normal file
37
nginx.conf
Normal file
@@ -0,0 +1,37 @@
|
||||
# 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user