1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-09-19 23:21:47 +02:00
polr/.nginx-config

34 lines
988 B
Plaintext
Raw Normal View History

# =========================
# Polr nginx redirect rules
# http://github.com/cydrobolt/polr
2014-12-04 20:49:41 +01:00
# Add this file to your nginx configuration at /etc/nginx/conf.d/
# Please note that this configuration is experimental,
# and may have issues.
# =========================
2014-12-04 20:49:41 +01:00
server {
listen 80;
server_name %SERVER_NAME%;
root /app;
index index.php;
location / {
if (!-e $request_filename) {
rewrite ^/([a-zA-Z0-9]+)\?([a-zA-Z0-9]+)$ /r.php?u=$1&lkey=$2;
}
rewrite ^/([a-zA-Z0-9]+)/?$ /r.php?u=$1;
rewrite ^/?\+([a-zA-Z0-9]+)$ /stats.php?bv=$1;
}
location /t {
rewrite ^/t-([a-zA-Z0-9]+)/?$ /r.php?u=t-$1;
}
location /api {
rewrite ^(.*)$ /api.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}