添加留言
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]
               

 
wildin Email
2011-9-30 17:43
fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;
    fastcgi_buffer_size 64k;
    fastcgi_buffers 4 64k;
    fastcgi_busy_buffers_size 128k;
    fastcgi_temp_file_write_size 128k;
    gzip  on;
    gzip_min_length  1k;
    gzip_buffers     4 16k;
    #gzip_http_version 1.0;
    gzip_comp_level 5;
    gzip_types       text/plain application/x-javascript text/css application/xml;
    gzip_vary on;
    gzip_http_version 1.1;
    server {
        listen       80;
        server_name  moodle.tf-swufe.net;
        index index.html index.htm index.php;
        root  /coredata/htdocs/moodle;
        #charset koi8-r;
       rewrite ^/file.php/(.*)$ /file.php?file=/$1 last;
       rewrite ^/user/pix.php(.*)$ /user/pix.php?file=/$1 last;
       rewrite ^/blocks/graph.php/(.*)$ /blocks/graph.php?file=/$1 last;  
     # access_log  logs/moodle.access.log  main;

       location ~ .*\.(php|php5)?$
       {      
        #fastcgi_pass  unix:/tmp/php-cgi.sock;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        include fcgi.conf;
       }
    
       location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
       {
         expires      30d;
       }

       location ~ .*\.(js|css)?$
       {
        expires      1h;
       }    

       log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
              '$status $body_bytes_sent "$http_referer" '
              '"$http_user_agent" $http_x_forwarded_for';
        access_log  logs/moodle.access.log  access;
        
        location /nginx-status {
            stub_status on;
            access_log  off;
        }        
    }
}
---------------------------------
然后 在另一台机器上用 ab -n 50000 -c 500 http://moodle.tf-swufe.net/ 来压,服务器无所应,且top如图:


点击在新窗口中浏览此图片
http://moodle.tf-swufe.net/other/top.jpg


请教如何优化。。。,谢谢!
wildin Email
2011-9-30 17:42
张老师好:
按照你的NGINX配置文档,在ESX上搭建了WEB服务器,8核CPU 16G内存
----------------------------------
user  www www;
worker_processes  15;
error_log  logs/error.log  crit;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
pid        logs/nginx.pid;
worker_rlimit_nofile 65535;
events {
    use epoll;
    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;
    
    server_names_hash_bucket_size 128;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_max_body_size 128m;
    sendfile        on;
    tcp_nopush     on;
    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay on;
jimmy Homepage
2011-9-30 14:31
对于原来使用apache的如何无损平移这个最为重要。不管是用什么web server。apache也好,nginx也罢。关键是升级后如何过渡。因为还要涉及到伪静态问题,apache下面的和nginx下面肯定不一样的
xw
2011-9-29 23:08
张老师,我是刚刚接触到linux,想自己搭一台服务器,做测试使用,但总是搭不起来,到处都是问题,就拿装mysql来说,按照您介绍的方法,有时候安装成功,并且使用正常,但有时候就出现问题,或者编译,或者安装,好像linux版本不一样的原因,我也弄不明白,总是出现问题,一直很困扰,希望您给我指导一下
漫步云端 Email
2011-9-29 21:35
是用APMServ还是Nginx问题不大,问题是怎么让我们这些用您的APMServ 5.2.6老用户平滑升级才是最重要的,我们的网站现在在你APMServ 5.2.6搭建的服务器上,改用新版本后会不会出现很多无知问题啊??希望张老师好好考虑一下啊!
i
2011-9-29 15:09
Apache  用惯了 没了他害怕不习惯
yiwoodstock Email
2011-9-29 14:45
您好!请问“大侠”我是昨天安装了您的08年开发的软件APMServ2.5.6的软件但是我用不了我解压了还有打开了放了网站的文件去了按“本地访问站点”但是我的电脑上登录不了您所说的127.0.0.1打开不了,我也查过网友的资料看了也操作过来还是不成功。请问大侠我应该是要怎么做好呢?我安装的系统是WINXPSP3的请大侠指点下!
rainbow
2011-9-29 11:27
每次看张大的blog都有很大的收获
sunset Email Homepage
2011-9-29 10:12
张大哥,我非常期待你的6.0版本,我从你这学到了很多东西,我本来是PHP什么都不懂的,多年来,学习的技术心得,我居然学会了,呵呵,虽然还没有达到牛人的境界,但是应付还是可以的
晓妹
2011-9-29 09:31
亲 吖 新版本 新~~~~~~~~~~
分页: 2950/3099 第一页 上页 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 下页 最后页