Last active
August 29, 2015 14:26
-
-
Save bmwant/cbdeff769f232272ff46 to your computer and use it in GitHub Desktop.
php-cgi with nginx on windows
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
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More info nginx docs