Skip to content

Instantly share code, notes, and snippets.

What would you like to do? NGINX configuration
map $http_accept_language $lang {
default zh_CN;
~en en;
~ca ca;
server {
listen [::]:80;
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