Skip to content

Instantly share code, notes, and snippets.

@chrisjlee
Forked from chanmix51/app.nginx.conf
Created July 18, 2012 14:15
Show Gist options
  • Save chrisjlee/3136434 to your computer and use it in GitHub Desktop.
Save chrisjlee/3136434 to your computer and use it in GitHub Desktop.
nginx vhost conf silex & symfony
server {
listen 80;
server_name server.mydomain.net
root /var/www/app/web;
index index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
location / {
if (-f $request_filename) {
expires max;
break;
}
if ($request_filename !~ "\.(js|htc|ico|gif|jpg|png|css)$") {
rewrite ^(.*) /index.php last;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment