Skip to content

Instantly share code, notes, and snippets.

@morganpyne
Created December 13, 2010 11:30
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 morganpyne/738914 to your computer and use it in GitHub Desktop.
Save morganpyne/738914 to your computer and use it in GitHub Desktop.
Minimal nginx vhost config for Symfony/PHP project
server {
server_name projectname.local default;
listen 80;
root /Users/username/projects/projectname/web;
index index.php index.html;
access_log /opt/nginx/logs/projectname.access.log;
charset utf-8;
location /sf/ {
root /Users/username/projects/projectname/lib/vendor/symfony/data/web/;
}
location / {
autoindex on;
try_files $uri /index.php?$args;
expires max;
location ~ \.php$ {
include fastcgi_params;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment