1
0
Fork 0
mirror of synced 2024-06-21 12:20:13 +12:00

improve nginx config

This commit is contained in:
nagadomi 2015-08-12 23:01:45 +09:00
parent 0b9a8b514c
commit 291a139ed8

View file

@ -1,19 +1,28 @@
upstream waifu2x {
server localhost:8812;
}
map $http_accept_language $lang {
default en;
~ja ja;
~en en;
}
server {
server_name waifu2x.udp.jp;
# listen 80 default_server;
server_name waifu2x.udp.jp; # fill your domain
access_log /var/log/nginx/waifu2x.udp.jp.access.log;
access_log /var/log/nginx/waifu2x.access.log;
root /home/ubuntu/waifu2x/assets;
try_files $uri $uri/index.$lang.html $uri/index.html @api;
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;
location / {
location ~ ^/(apple-touch-icon|browserconfig|favicon|mstile)(.*)\.(png|xml|ico)$ {
return 204;
}
location @api {
proxy_pass http://waifu2x;
}
}