web服务器问题.
- 如果使用prefork的是有问题,不过现在的维护人员使用apache一般是work模式的了.
2. apache注释掉多余的模块,php.ini注释掉多余的模块, 虽然apache是通用的,但专用的话,我们会获得更好得多的性能. 比如静态内容的话,前端可以用nginx来代替.
3. 使用squid或者vanish缓存内容;
- 对于静态和动态的内容设置过期策略;
5. Don’t let Apache spoon-feed the client . 这不仅慢,也让dos攻击变得容易. 前端可以放置负载均衡设备(有buffer),nginx,squid或者Apache in event-driven mode 在应用前端;
6. 启用gzip;
7. apache的keep alive 不要设置得太长. 如果前端有负载均衡设备的话,负载均衡设备可以让连接apache的连接少很多的话,那么设置较大的值成为可能;
找到合适的并发设置
一般web服务器的连接有一个最优的值.[……]
Read more
Linode VPS安装使用
最近入手了LINODE的VPS,安装了NGINX,PHP,MYSQL,APACHE等软体。原来的BURST购买的VPS虽然价格便宜,但访问缓慢,严重影响了自己用博客做笔记的效率。
这里记录下编译的参数。有兴趣的同学参考下。
linide vps 安装
1. apache+php的安装安装 (略)
2. 在user_name下安装了nginx+php
安装nginx 1.7.0
./configure –prefix=/home/user_name/app/nginx –with-http_stub_status_module –with-http_ssl_module –with-http_gzip_static_module
安装php 5.3.28
./configure –prefix=/home/user_name/app/php5.3 –with-config-file-path=/usr/local/local/php5.3/etc –with-mysql=/usr/local/mysql[……]
Read more
查看软件的编译参数
查看nginx,apache,mysql,php的编译参数,版本
nginx编译参数,版本:
nginx -V
apache编译参数:
cat /usr/local/apache2/build/config.nice
apache版本:
./httpd -V
php编译参数:
/usr/local/php/bin/php -i |grep configure
php版本:
./php -v
mysql编译参数:
cat “/usr/local/mysql/bin/mysqlbug”|grep configure
nginx + memcached + apache = light and fast web server setup[……]
Read more