Skip to content

Instantly share code, notes, and snippets.

Created Jan 11, 2013
What would you like to do?
This is an nginx config file for local development which automatically directs *.dev to ~/www/*
worker_processes 2;
error_log logs/error.log;
events {
worker_connections 1024;
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name ~^(?<sub>.+)\.dev$;
root /Users/austin/www/$sub;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$args&q=$uri;
location ~ \.php$ {
fastcgi_pass unix:/tmp/php-fpm.sock;
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