张老师好:
按照你的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;
按照你的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;
xw
2011-9-29 23:08
张老师,我是刚刚接触到linux,想自己搭一台服务器,做测试使用,但总是搭不起来,到处都是问题,就拿装mysql来说,按照您介绍的方法,有时候安装成功,并且使用正常,但有时候就出现问题,或者编译,或者安装,好像linux版本不一样的原因,我也弄不明白,总是出现问题,一直很困扰,希望您给我指导一下
i
2011-9-29 15:09
Apache 用惯了 没了他害怕不习惯
您好!请问“大侠”我是昨天安装了您的08年开发的软件APMServ2.5.6的软件但是我用不了我解压了还有打开了放了网站的文件去了按“本地访问站点”但是我的电脑上登录不了您所说的127.0.0.1打开不了,我也查过网友的资料看了也操作过来还是不成功。请问大侠我应该是要怎么做好呢?我安装的系统是WINXPSP3的请大侠指点下!
rainbow
2011-9-29 11:27
每次看张大的blog都有很大的收获
晓妹
2011-9-29 09:31
亲 吖 新版本 新~~~~~~~~~~















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
请教如何优化。。。,谢谢!