Skip to content

Instantly share code, notes, and snippets.

@einkoro
Created May 6, 2014 06:25
Show Gist options
  • Save einkoro/920b8f49d884d79e557c to your computer and use it in GitHub Desktop.
Save einkoro/920b8f49d884d79e557c to your computer and use it in GitHub Desktop.
Oyster fastcgi with nginx
server {
listen 80;
listen [::]:80;
server_name bitpiston.com;
root /home/bitpiston/www;
#access_log /var/log/nginx/bitpiston.com-access.log;
access_log off;
error_log /var/log/nginx/bitpiston.com-error.log;
## Hand the request to oyster unless it exists
location / {
index /home/bitpiston/oyster/oyster.fcgi
try_files $uri $uri/ /home/bitpiston/oyster/oyster.fcgi$is_args$args;
}
location /styles/ {
alias /home/bitpiston/oyster/site/styles/;
}
location /files/ {
alias /home/bitpiston/oyster/site/files/;
}
location ~ \.fcgi$ {
fastcgi_index oyster.fcgi;
fastcgi_intercept_errors on;
fastcgi_pass "unix:/var/run/oyster-bitpiston.sock";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment