Skip to content

Instantly share code, notes, and snippets.

@xspager
Last active February 23, 2016 15:14
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 xspager/86aacbd44d8a9996c8e6 to your computer and use it in GitHub Desktop.
Save xspager/86aacbd44d8a9996c8e6 to your computer and use it in GitHub Desktop.
config file for fcgi on nginx
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
root /home/xspager;
index index.lua index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
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";
}
location / {
include /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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment