nginx下载地址:[http://www.nginx.org/download/nginx-1.3.7.zip]
php下载地址:[http://windows.php.net/downloads/releases/php-5.3.18-nts-Win32-VC9-x86.zip] (VC9 x86 Non Thread Safe 5.3.18 zip windows)
mysql下载地址:
[http://www.mysql.com/downloads/mirror.php?id=409760](windows 32位)[http://www.mysql.com/downloads/mirror.php?id=409777 ](windows 64位) 【下载时要登录,如果可以,就自己注册用户。已经注册好的用户:1051292443@qq.com anjiaxin】
extension_dir="e:/php/ext" ;extension=php_bz2.dll ;extension=php_curl.dll ;extension=php_gd2.dll ;extension=php_gettext.dll ;extension=php_mbstring.dll ;extension=php_mysql.dll ;extension=php_mysqli.dll ;extension=php_openssl.dll ;extension=php_pdo_mysql.dll ;extension=php_sockets.dll ;extension=php_xmlrpc.dll
例如:doc_root="e:/www"
1、将‘php.ini’文件复制到“C:\windows”目录下面 2、将php根目录下面的文件“libeay32.dll, ssleay32.dll”复制到“C:/windows/system32”目录下面 3、将‘php/ext’目录下的文件“php_curl.dll,php_openssl.dll”复制到“C:/windows/system32”目录下面
@echo off echo Starting PHP FastCGI... e:/php/php-cgi.exe -b 127.0.0.1:9000 -c e:/php/php.ini
@echo off echo Stopping nginx... taskkill /F /IM nginx.exe > nul echo Stopping PHP FastCGI... taskkill /F /IM php-cgi.exe > nul exit
#user nobody; worker_processes 1; error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; root e:/www; charset utf-8; access_log logs/host.access.log; location / { root e:/www; index index.html index.htm index.php; autoindex on; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root e:/www; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php { include fastcgi_params; set $path_info ""; set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") { set $real_script_name $1; set $path_info $2; } fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } }
以上配置文件中有很重要一点需要说明一下: 1、文件中"root e:/www;" 和php.ini中的”doc_root="e:/www"“ 路径必须是一致的,负责无法解析php文件 2、文件中以下代码是为了配置nginx解析"pathinfo"函数 set $path_info ""; set $real_script_name $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") { set $real_script_name $1; set $path_info $2; } fastcgi_param SCRIPT_NAME $real_script_name; fastcgi_param PATH_INFO $path_info;
enable_dl = On cgi.force_redirect = 0 cgi.fix_pathinfo=1 fastcgi.impersonate = 1 cgi.rfc2616_headers = 1 allow_url_fopen = On到这里php+nginx算是配置完成了,在您的工作目录写入info.php,然后启动nginx和php。启动方法如下图所示的文件双击:
<?php phpinfo();如果出现以下内容说明配置成功了。
在配置完nginx后,有两个启动文件"start_php.bat"和"nginx.exe",而且php启动后会有一个显示框,感觉不是很舒服,有以下方法可以解决这个问题 下载一个脚本文件"RunHiddenConsole.exe",RunHiddenConsole.exe的作用是在执行完命令行脚本后可以自动关闭脚本,而从脚本中开启的进程不被关闭。 RunHiddenConsole下载地址:[http://redmine.lighttpd.net/attachments/660/RunHiddenConsole.zip] 下载完了解压,把"RunHiddenConsole.exe"放在和"nginx.ext"文件同级的目录 修改"start_php.bat"文件,修改后的文件内容如下: @echo off echo Starting PHP FastCGI... RunHiddenConsole E:/php/php-cgi.exe -b 127.0.0.1:9000 -c E:/php/php.ini echo Starting nginx... RunHiddenConsole E:/nginx/nginx.exe -p E:/nginx
[zend.loader] zend_extension = "E:/php/ext/ZendLoader.dll" zend_loader.enable = 1 zend_loader.disable_licensing=0 zend_loader.obfuscation_level_support=3 zend_loader.license_path=
mysql的配置方法很简单,下载安装包,根据提示一步步进行就可以完成 mysql端口默认3306
ecstore ego版本的代码是有加密的,所以首先要配置解密工具,其次是获取授权文件,最后才能成功安装ecstore,具体步骤如下
;zend_loader.license_path= zend_loader.license_path=***/config/developer.zl