Skip to content

Instantly share code, notes, and snippets.

@sfarkas1988
Created October 24, 2015 19:39
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 sfarkas1988/f781ef3015f7d794b6b2 to your computer and use it in GitHub Desktop.
Save sfarkas1988/f781ef3015f7d794b6b2 to your computer and use it in GitHub Desktop.
example nginx
server {
listen *:80;
server_name time.dev www.time.dev;
client_max_body_size 1m;
root /var/www/time/web;
index app_dev.php;
access_log /var/log/nginx/xxx_time.access.log;
error_log /var/log/nginx/xxx_time.error.log;
location ~ \.php$ {
root /var/www/time/web;
fastcgi_index app_dev.php;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
try_files $uri $uri/ /app_dev.php$is_args$args;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param APP_ENV dev;
}
location / {
root /var/www/time/web;
try_files $uri $uri/ /app_dev.php$is_args$args;
autoindex off;
index index.html index.htm index.php;
}
sendfile off;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment