全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 3489|回复: 14

[求测试 ~~]网站访问很慢很慢,可能是php问题???

[复制链接]
发表于 2011-4-8 16:21:35 | 显示全部楼层 |阅读模式
Ubuntu 10.04
nginx--0.8.54
php--5.32
php5-fpm

/etc/nginx/nginx.conf
  1. uer www-data;
  2. worker_processes 1;
  3. pid /var/run/nginx.pid;

  4. worker_rlimit_nofile 8192;

  5. events {
  6.     worker_connections 4096;
  7. }

  8. http {
  9.     include /etc/nginx/mime.types;
  10.     include /etc/nginx/fastcgi_params;
  11.     default_type application/octet-stream;

  12.     sendfile on;
  13.     tcp_nopush on;

  14.     server_names_hash_bucket_size 128;
  15.     clirge_client_header_buffers 4 32k;
  16.     client_max_body_size 8m;
  17.     client_header_buffer_size 32k;

  18.     log_format   main '$remote_addr - $remote_user [$time_local]  $status '
  19.       '"$request" $body_bytes_sent "$http_referer" '
  20.       '"$http_user_agent" "$http_x_forwarded_for"';

  21.     access_log /var/log/nginx/access.log main;
  22.     error_log /var/log/nginx/error.log;
  23.     include /etc/nginx/sites-enabled/*;
  24. }
复制代码
/etc/nginx/site-enable/default
  1. server {
  2.     listen      80;
  3.     server_name  aoy.me;
  4.     root         /var/www;

  5.     location / {
  6.         index  index.html index.php;
  7.      }

  8.     location ~* \.(gif|jpg|png)$ {
  9.         expires   30d;
  10.      }

  11.     location ~ \.php$ {
  12.          fastcgi_pass   127.0.0.1:9000;
  13.      }
  14. }
复制代码
/etc/nginx/fastcgi_params;
  1. tcgi_param   QUERY_STRING        $query_string;
  2. fastcgi_param   REQUEST_METHOD      $request_method;
  3. fastcgi_param   CONTENT_TYPE        $content_type;
  4. fastcgi_param   CONTENT_LENGTH      $content_length;

  5. fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
  6. fastcgi_param   SCRIPT_NAME         $fastcgi_script_name;
  7. fastcgi_param   REQUEST_URI         $request_uri;
  8. fastcgi_param   DOCUMENT_URI        $document_uri;
  9. fastcgi_param   DOCUMENT_ROOT       $document_root;
  10. fastcgi_param   SERVER_PROTOCOL     $server_protocol;

  11. fastcgi_param   GATEWAY_INTERFACE   CGI/1.1;
  12. fastcgi_param   SERVER_SOFTWARE     nginx/$nginx_version;

  13. fastcgi_param   REMOTE_ADDR         $remote_addr;
  14. fastcgi_param   REMOTE_PORT         $remote_port;
  15. fastcgi_param   SERVER_ADDR         $server_addr;
  16. fastcgi_param   SERVER_PORT         $server_port;
  17. fastcgi_param   SERVER_NAME         $server_name;

  18. fastcgi_index   index.php;

  19. fastcgi_param   REDIRECT_STATUS     200;
复制代码
/etc/php5/fpm/php5-fpm.conf
  1. bal]
  2. pid = /var/run/php5-fpm.pid
  3. error_log = /var/log/php5-fpm.log
  4. [www]
  5. listen = 127.0.0.1:9000

  6. user = www-data
  7. pm = static
  8. pm.max_children = 12
  9. pm.start_servers = 4
  10. pm.min_spare_servers = 5
  11. pm.max_spare_servers = 10

  12. rlimit_files = 51200
复制代码
网址为   http://aoy.me/
    首页为phpinfo()   
很慢很慢才能显示出来

刚用lnmp.org的脚本一键安装之后 貌似还是很慢很慢

[ 本帖最后由 Auston 于 2011-4-8 18:16 编辑 ]
发表于 2011-4-8 16:41:13 | 显示全部楼层
IO多快呢?
 楼主| 发表于 2011-4-8 16:47:22 | 显示全部楼层
怎么看IO 。。。
 楼主| 发表于 2011-4-8 17:03:01 | 显示全部楼层
dd if=/dev/zero of=/root/zerofile bs=1M count=256

508 MB/s
发表于 2011-4-8 17:05:28 | 显示全部楼层
5.3换成5.217或14呢?你换lnmp一键包试一下呢?确实不快。
发表于 2011-4-8 17:36:59 | 显示全部楼层
一点都不觉得慢
 楼主| 发表于 2011-4-8 17:39:20 | 显示全部楼层
好吧~

   lnmp一键安装包。。。
 楼主| 发表于 2011-4-8 18:05:06 | 显示全部楼层
难道是网络线路的问题。。。。

一键安装之后还是那么慢。。。
发表于 2011-4-8 18:07:01 | 显示全部楼层
keep-alive 在网络情况不好的时候,有很大作用
 楼主| 发表于 2011-4-8 18:37:24 | 显示全部楼层
貌似还是php问题

访问 纯 html 文件网址 没任何问题
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-6 16:20 , Processed in 0.070375 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表