Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nyaa.cat NGINX configuration
map $http_accept_language $lang {
default zh_CN;
~en en;
~ca ca;
}
server {
listen [::]:80;
server_name minecraft.phoenixlzx.com;
root /var/www/nyaacat_static_page;
index index.html.$lang;
error_page 404 404.html.$lang;
location / {
try_files $uri $uri/ /index.html.$lang;
}
location ~ \.html$ {
try_files $uri $uri/ $uri.$lang;
}
location /downloads/ {
alias /var/www/minecraft_downloads/;
autoindex on;
charset utf8,bgk;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.