server {
listen 80;
server_name ordinary-minecraft.ru www.ordinary-minecraft.ru;
root /srv/webmcr/;
index index.php index.html;
location /news {
rewrite ^/news/([^/]+)/?$ /index.php?id=$1 last;
}
location /category {
rewrite ^/category/([^/]+)/?$ /index.php?cid=$1 last;
}
location /list {
rewrite ^/list/([^/]+)/?$ /index.php?l=$1 last;
}
location /control {
rewrite ^/control/([^/]+)/?$ /index.php?mode=control&do=$1 last;
}
location /get {
rewrite ^/get/([^/]+)/?$ /action.php?method=download&file=$1 last;
}
location /go {
rewrite ^/go/([^/]+)/?$ /index.php?mode=$1 last;
}
location = /authenticate {
rewrite ^(.*)$ /MineCraft/auth16x.php last;
}
location = /invalidate {
rewrite ^(.*)$ /MineCraft/invalidate16x.php last;
}
location = /refresh {
rewrite ^(.*)$ /MineCraft/refresh16x.php last;
}
location /game {
rewrite ^/game/joinserver.jsp /MineCraft/joinserver.php last;
}
location / {
try_files $uri $uri/index.php?$uri&$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}