Home  >  Article  >  php教程  >  wnpmx 配置小记

wnpmx 配置小记

WBOY
WBOYOriginal
2016-06-06 20:07:491177browse

wnpmx? windows+ngix+php+mysql+xdebug 做网站要用到 php 自己动手做了一下配置,算是个流水账; 0:首先把php,nginx,mysql,xdebug下载回来,把 xdebug.dll 放到 ext 目录里。 1:修改nginx config 文件 http {fastcgi_connect_timeout 300;fastcgi_send_time

wnpmx? windows+ngix+php+mysql+xdebug

做网站要用到 php 自己动手做了一下配置,算是个流水账;

0:首先把php,nginx,mysql,xdebug下载回来,把 xdebug.dll 放到 ext 目录里。

1:修改nginx config 文件

http {
	fastcgi_connect_timeout 300;
	fastcgi_send_timeout 300;
	fastcgi_read_timeout 300;
	client_header_buffer_size 16k;
	large_client_header_buffers 4 64k;
	proxy_buffer_size  16k;
	proxy_buffers      4 16k;
	fastcgi_buffer_size 32k;
	fastcgi_buffers 8 32k;
	server {
	    log_format  hms1  '$remote_addr - $remote_user [$time_local] "$request" localDirectory $request_filename'
						  '$status $body_bytes_sent "$http_referer" '
						  '"$http_user_agent" $http_x_forwarded_for';
		log_format  hms  '"$fastcgi_script_name"';
		autoindex_localtime on;
		autoindex on;
		index index.php index.html index.htm;
		listen 8088;
		location / {
			root D:/qq;#可以指定你的web目录
			index index.php index.html index.htm;
			autoindex on; #是否显示目录
		}
		location ~ \.php$ {
			log_format  www.zjs.com.php  $fastcgi_script_name;
			access_log  logs/zjs.log  www.zjs.com.php;
            fastcgi_pass   127.0.0.1:9001;
            #fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  D:/qq/$fastcgi_script_name;
            include        fastcgi_params;
        }
		#server_name hmsbeta1.qunar.com hmsbeta1.qunarman.com;
		server_name  me.qunarman.com
		#error_page 404 = 200 /empty.gif;
		error_page 404 = @notfound;
	}
}

2:修改php.ini 使其支持 xdebug

zend_extension = "D:\qzz\trunk\windows\php\ext\php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9002

3: 启动nginx:start nginx.ext
4: 启动fastcgi:php-cgi.exe -b 127.0.0.1:9001
5:mysql 就不用唠叨了安装就行了

注意点:折腾 xdebug 搞了好一会儿,最后才明白没有下载好正确的版本;网上本一下,有一个方法,把自己 phpinfo 吐到网页上的源码全 copy,然后到 http://xdebug.org/wizard.php;把源码放进这个文本域里提交,自动出现一个下载地址;下载就ok了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn