Skip to content

Instantly share code, notes, and snippets.

@MattKetmo
Created December 8, 2015 21:40
Show Gist options
  • Save MattKetmo/f5585bd1dbcf7ba45d16 to your computer and use it in GitHub Desktop.
Save MattKetmo/f5585bd1dbcf7ba45d16 to your computer and use it in GitHub Desktop.
FastCGI nginx config
server {
listen 80;
server_name fastcgi.dev;
location / {
fastcgi_pass 127.0.0.1:6000;
include fastcgi_params;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root;
fastcgi_param SCRIPT_NAME $document_root$fastcgi_script_name;
fastcgi_param SERVER_NAME $host;
}
}
@AndrewCarterUK
Copy link

upstream workers {
    server 127.0.0.1:6000;
    server 127.0.0.1:6001;
    server 127.0.0.1:6002;
}

server {
    listen 80;
    server_name fastcgi.dev;

    location / {
        fastcgi_pass workers;
        fastcgi_param SCRIPT_FILENAME $document_root;
        include fastcgi_params;
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment