Friday, August 24, 2012

NGINX + PHP + MySQL on Windows

TL;DR


1. NGiNX + PHP + Node.js + MySQL + MongoDB stack
http://winginx.com/download

2. Nginx only
http://kevinworthington.com/nginx-for-windows/


Getting the Files

1. Download NGINX from http://nginx.org/en/download.html
2. Download PHP http://windows.php.net/download/
3. Download MySQL http://dev.mysql.com/downloads/mysql/

Part 1: PHP

Create config.ini.

Run php-cgi.exe -b 127.0.0.1:9000


Part 2: MySQL

Coming soon...

Part 3: NGINX

Goto conf/nginx.conf and uncomment the following:

location ~ \.php$ 
    root           html;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include        fastcgi_params;
}

Starts the Server

Run start nginx

References:

1 comment:

modells said...

Also check out WT-NMP - portable Nginx Mysql Php development stack for Windows

https://sourceforge.net/p/wtnmp/wiki/Home/