Skip to content

Instantly share code, notes, and snippets.

@alobato
Last active August 29, 2015 14:16
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 alobato/ceb80255d3070754986c to your computer and use it in GitHub Desktop.
Save alobato/ceb80255d3070754986c to your computer and use it in GitHub Desktop.
server {
server_name domain;
rewrite ^/(.*) http://www.domain/$1 permanent;
access_log /dev/null;
error_log /dev/null;
}
server {
server_name domain;
root /home/deployer/apps/appname/current;
index index.php;
client_max_body_size 40M;
error_log /home/deployer/apps/appname/shared/log/error.log;
access_log /home/deployer/apps/appname/shared/log/access.log;
location / {
# index index.html index.htm index.php;
# try_files $uri $uri/ /index.php?q=$request_uri;
try_files $uri $uri/ /index.php?$args;
}
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;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment