Created
January 11, 2013 16:32
This is an nginx config file for local development which automatically directs *.dev to ~/www/*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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