Skip to content
04ebaa3
45 lines (33 sloc) 1.28 KB
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
fastcgi_buffers 256 4k;
upstream heroku-fcgi {
#server 127.0.0.1:4999 max_fails=3 fail_timeout=3s;
server unix:/tmp/heroku.fcgi.<?=getenv('PORT')?:'8080'?>.sock max_fails=3 fail_timeout=3s;
keepalive 16;
}
server {
listen <?=getenv('PORT')?:'8080'?>;
root <?=getenv('DOCUMENT_ROOT')?:getenv('HEROKU_APP_DIR')?:getcwd()?>;
error_log stderr;
access_log /tmp/heroku.nginx_access.<?=getenv('PORT')?:'8080'?>.log;
include <?=getenv('HEROKU_PHP_NGINX_CONFIG_INCLUDE')?>;
# default handling of .php
location ~ \.php {
try_files $uri =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass heroku-fcgi;
}
}
}
Jump to Line
Something went wrong with that request. Please try again.