1
0
Fork 0
mirror of synced 2024-06-11 23:44:30 +12:00
waifu2x/appendix/waifu2x.nginx.conf

30 lines
761 B
Plaintext
Raw Normal View History

2015-05-17 18:28:02 +12:00
upstream waifu2x {
server localhost:8812;
}
2015-08-13 02:01:45 +12:00
map $http_accept_language $lang {
default en;
~ja ja;
~en en;
2015-09-07 18:16:44 +12:00
~ru ru;
2015-08-13 02:01:45 +12:00
}
2015-05-17 18:28:02 +12:00
server {
2015-08-13 02:01:45 +12:00
# listen 80 default_server;
server_name waifu2x.udp.jp; # fill your domain
2015-05-17 18:28:02 +12:00
2015-08-13 02:01:45 +12:00
access_log /var/log/nginx/waifu2x.access.log;
2015-05-17 18:28:02 +12:00
root /home/ubuntu/waifu2x/assets;
2015-08-13 02:01:45 +12:00
try_files $uri $uri/index.$lang.html $uri/index.html @api;
2015-05-17 18:28:02 +12:00
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
2015-08-13 02:01:45 +12:00
location ~ ^/(apple-touch-icon|browserconfig|favicon|mstile)(.*)\.(png|xml|ico)$ {
return 204;
}
location @api {
2015-05-17 18:28:02 +12:00
proxy_pass http://waifu2x;
}
}