Skip to content

Instantly share code, notes, and snippets.

@vivekagr
Created December 17, 2015 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vivekagr/6494fa54bbbb76ca9e4a to your computer and use it in GitHub Desktop.
Save vivekagr/6494fa54bbbb76ca9e4a to your computer and use it in GitHub Desktop.
nginx config to go along with lang.lua
server {
listen 80 default_server;
root /home/ubuntu/test;
index index.html index.htm;
error_log /home/ubuntu/test/error.log;
access_log /home/ubuntu/test/access.log;
location / {
set $lang_sup "en,fr";
lua_code_cache off;
set_by_lua_file $lang_accept /etc/nginx/lang.lua $lang_sup;
root /home/ubuntu/test/$lang_accept;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment