上一页 1 2 3 4 5 6 7 8 ··· 20 下一页
摘要: Nginx的日志记录主机设置server {listen 80;server_name a8z8.com;root /etc/www/abc;access_log /var/log/www/abc/access.log;location / {index index.htm index.htm;}}默认情况下,access_log 会使用 combined 的配置来记录访问日志log_format combined ‘$remote_addr – $remote_user [$time_local] ‘‘”$request” $status $body_bytes_sent ‘‘”$http_ 阅读全文
posted @ 2012-05-25 14:37 Rayol 阅读(6168) 评论(0) 推荐(1) 编辑
摘要: 1:Function ereg() is deprecated Error 错误对策 Deprecated: Function ereg() is deprecated in …… 解决方法一: 退回去用php5.2。 解决方法二:继续用php5.3,但是修改devel/devel.modul的460行: if ($errno & (E_ALL ^ E_NOTICE)) { 改为 if ($errno & (E_ALL & ~E_NOTICE & ~E_DEPRECATED)) { 把deprecated错误给忽略掉) 解决方法三:把ereg换成preg_mat 阅读全文
posted @ 2012-05-24 22:35 Rayol 阅读(530) 评论(0) 推荐(1) 编辑
摘要: 1 netstat -n | awk '/^tcp/ {n=split($(NF-1),array,":");if(n<=2)++S[array[(1)]];else++S[array[(4)]];++s[$NF];++N} END {for(a in S){printf("%-20s %s\n", a, S[a]);++I}printf("%-20s %s\n","TOTAL_IP",I);for(a in s) printf("%-20s %s\n", a, s[a]);pri 阅读全文
posted @ 2012-05-24 22:32 Rayol 阅读(4173) 评论(0) 推荐(2) 编辑
摘要: 1 server { 2 include listen.conf; 3 server_name ucenter.gznow.org; 4 5 location ~ \.php$ { 6 limit_conn one 20; 7 limit_rate 50k; 8 proxy_pass http://s1; 9 include proxy.conf;10 }11 12 location / {13 expires max;14 ... 阅读全文
posted @ 2012-05-23 15:47 Rayol 阅读(789) 评论(0) 推荐(0) 编辑
摘要: Nginx中Upstream目前支持4种方式的分配1、轮询(默认)每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除。2、weight指定轮询几率,weight和访问比率成正比,用于后端服务器性能不均的情况。 例如: upstream bakend { server 192.168.0.14 weight=10; server 192.168.0.15 weight=10; }3、ip_hash 每个请求按访问ip的hash结果分配,这样每个访客固定访问一个后端服务器,可以解决session的问题。例如:1 upst... 阅读全文
posted @ 2012-05-23 15:25 Rayol 阅读(1279) 评论(0) 推荐(1) 编辑
摘要: 1、传统缓存之一(404)这个办法是把nginx的404错误定向到后端,然后用proxy_store把后端返回的页面保存。配置:location / {root /home/html/;#主目录expires 1d;#网页的过期时间error_page 404 =200 /fetch$request_uri;#404定向到/fetch目录下}location /fetch/ {#404定向到这里internal;#指明这个目录不能在外部直接访问到expires 1d;#网页的过期时间alias /home/html/;#虚拟目录文件系统地址要和locaion /一致,proxy_store会将 阅读全文
posted @ 2012-05-22 08:31 Rayol 阅读(2984) 评论(2) 推荐(4) 编辑
摘要: 1.FastCGIworker进程数是否不够通过命令查看服务器上一共开了多少的php-cgi进程ps-fe|grep"php"|grep-v"grep"|wc-l 使用如下命令查看已经有多少个php-cgi进程用来处理tcp请求netstat-anop|grep"php"|grep-v"grep"|wc-l 接近配置文件中设置的数值,表明worker进程数设置太少2.FastCGI执行时间过长根据实际情况调高以下参数值fastcgi_connect_timeout300;fastcgi_send_timeout30 阅读全文
posted @ 2012-05-22 07:53 Rayol 阅读(364) 评论(0) 推荐(1) 编辑
摘要: VC6:legacy Visual Studio 6 compiler,就是使用这个编译器编译的。VC9:Visual Studio 2008 compiler,就是用微软的VS编辑器编译的。由于apache.org只提供VC6的版本,所以使用原版apache时只能使用VC6。(www.apachelounge.com上有apache VC9的版本提供,应该可以和PHP VC9配合,没用过)TS:... 阅读全文
posted @ 2012-05-22 07:23 Rayol 阅读(244) 评论(0) 推荐(0) 编辑
摘要: Notice: Undefined index: xxx on line xxx; 虽然可以通过设置错误显示方式来隐藏这个提示,但是这样也有隐患,就是在服务器的日志中会记录这些提示,导致日志文件异常庞大。 方法1:服务器配置修改修改php.ini配置文件,error_reporting = E_ALL & ~E_NOTICE 方法2:对变量进行初始化。 方法3:做判断isset($_post[''... 阅读全文
posted @ 2012-05-22 07:21 Rayol 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 以前每当一个 Zend Studio 的新版本发布时都会同时发布一个新版的 Zend Studio Server 组件,这个组件可以让我们很方便地进行远程调试。但是自从 Zend 发布了 Zend Platform 以后他们就不再更新 Zend Studio Server 组件了。这就导致我们只能远程调试 PHP 5.1.x 的环境,而不能调试 PHP 5.2.x。要想调试 PHP 5.2.x 只... 阅读全文
posted @ 2012-05-14 22:55 Rayol 阅读(217) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 20 下一页