Skip to content

Instantly share code, notes, and snippets.

@gazmull
Last active August 23, 2019 23:26
Show Gist options
  • Save gazmull/85ea4cacc30647d8afc8ef910b2291a7 to your computer and use it in GitHub Desktop.
Save gazmull/85ea4cacc30647d8afc8ef910b2291a7 to your computer and use it in GitHub Desktop.
NGINX config sample for kamihime database
# This is for KamihimeDB v3.0. For v2.0
# see the last revision at https://gist.github.com/gazmull/85ea4cacc30647d8afc8ef910b2291a7/744f0ab8fea0284b6c483cf513e2475018994d95
server {
listen 80;
#listen [::]:80 default_server;
server_name [your domain name];
location ~ ^/(assets/|img/|js/|css/|scenarios/|og-image.png|robots.txt|humans.txt|favicon.ico) {
root /home/[your username]/kamihime-database;
try_files $uri /static/$uri /dist/static/$uri =404;
access_log off;
expires 24h;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:3000/;
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment