一、 php.ini配置项
1.extension_dir
2.doc_root
3. enable_dl = On
cgi.force_redirect = 1
cgi.fix_pathinfo = 1
fastcgi.impersonate = 1
cgi.rfc2616_headers = 1
4.extesion
二.nginx.conf配置项
1.events 选项 worker_connections 一个进程所处理的
最大连接数上限
2.server 选项
server {
listen 80; #服务器监听的端口,http请求的端口
server_name localhost; #服务器地址
charset GBK; #服务器处理的编码
#access_log logs/host.access.log main;
location / {
root D:/WAMP/WWW; #网站的根目录
index index.php default.php index.html index.htm; #网站的默认网页文件
autoindex off; #当网站没有默认文件时,打开域名不可以看到文件目录结构
}
#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 html;
}
# 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$ {
# root html;
fastcgi_pass 127.0.0.1:9000; #fast-cgi也就是php-cgi监听地址和端口
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME D:/WAMP/WWW$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}