brew install --without-apache --with-fpm --with-mysql php71
brew install nginx
server {
listen 8080;
server_name ~^(?<proj>[^.]+).devsites.local;
root /Users/{username}/www/$proj;
index index.html index.php;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
try_files $uri /index.html index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Assuming {projectName} as the folder name.
127.0.0.1 {projectName}.devsites.local