Skip to content

Instantly share code, notes, and snippets.

@GeneralZero
Created February 19, 2016 18:51
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 GeneralZero/1f2a9218b86a5b0a6425 to your computer and use it in GitHub Desktop.
Save GeneralZero/1f2a9218b86a5b0a6425 to your computer and use it in GitHub Desktop.
upstream unicorn {
server 127.0.0.1:3000 fail_timeout=0;
}
server {
listen 80;
server_name ;
root /var/www/html;
index $uri;
try_files /system/maintenance.html @unicorn;
location @unicorn {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn;
access_log logs/unicorn.access.log;
error_log logs/unicorn.error.log debug;
}
location test {
index index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment