Skip to content

Instantly share code, notes, and snippets.

@bmwant
Last active August 29, 2015 14:26
Show Gist options
  • Save bmwant/cbdeff769f232272ff46 to your computer and use it in GitHub Desktop.
Save bmwant/cbdeff769f232272ff46 to your computer and use it in GitHub Desktop.
php-cgi with nginx on windows
# in block server
location / {
root D:/project/www;
try_files $uri $uri/ /index.php;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
root D:/project/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# run php-cgi like this: php-cgi -b 127.0.0.1:9000
@bmwant
Copy link
Author

bmwant commented Jul 30, 2015

More info nginx docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment