Skip to content

Instantly share code, notes, and snippets.

@walm
Forked from jsahlen/dev
Created March 30, 2012 09:15
Show Gist options
  • Save walm/2250227 to your computer and use it in GitHub Desktop.
Save walm/2250227 to your computer and use it in GitHub Desktop.
nameserver 127.0.0.1
port 20560
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.php.php-fpm</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/Cellar/php/5.3.10/sbin/php-fpm</string>
</array>
<key>WorkingDirectory</key>
<string>/usr/local</string>
</dict>
</plist>
server {
server_name *.dev;
location / {
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:20559;
}
}
server {
server_name wordpress.dev; # set to your desired hostname
root /Users/walan/Sites/wordpress; # the document root
location / {
index index.php;
# this sends all non-existing file or directory requests to index.php
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?q=$1 last;
}
}
# pass the PHP scripts to our php-fpm server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment