Skip to content

Instantly share code, notes, and snippets.

@xspager
Created February 23, 2016 15:52
Show Gist options
  • Save xspager/92287d77c422b449e872 to your computer and use it in GitHub Desktop.
Save xspager/92287d77c422b449e872 to your computer and use it in GitHub Desktop.
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
root /usr/home/freebsd/xspager;
index index.lua;
# Make site accessible from http://ablogusingsailor.danielocl.com.br/
server_name ablogusingsailor.danielocl.com.br;
location / {
try_files $uri $uri/ /index.lua?r=$uri;
include /usr/local/etc/nginx/fastcgi_params; #or whatever you named it
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.lua;
fastcgi_pass 127.0.0.1:9000;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
# Some basic cache-control for static files to be sent to the browser
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment