gjw_apparitor 博客

孤独是一种态度

Follow me on TwitterRSS订阅

  • 首页

apache 配置SSI

四 6th

由gjw_apparitor发表在Web | 160 views

没有评论

在apache的 httpd.conf中

去消掉前边的注释
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddHandler server-parsed .shtml .html


Options Indexes FollowSymLinks Includes
AllowOverride None
Order allow,deny
Allow from all

在Directory里添加 Options Indexes FollowSymLinks Includes

apache

Nginx + pcre + zlib

四 6th

由gjw_apparitor发表在Web | 336 views

没有评论

prce

http://www.pcre.org/

# wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.9.tar.gz
# tar zxvf pcre-7.9.tar.gz
# cd pcre-7.9
# ./configure
# make && make install

zlib

http://www.zlib.net/

# wget http://www.gzip.org/zlib/zlib-1.2.3.tar.gz
# tar zxvf zlib-1.2.3.tar.gz
# cd zlib-1.2.3
# ./configure
# make && make install
# mkdir /usr/include/pcre/
# cp /usr/local/lib/libpcre.a /usr/include/pcre/libpcre.a
# cp /usr/local/lib/libpcre.a /usr/include/pcre/libpcre.la
# cp /root/pcre-7.9/pcre.h /usr/include/pcre/pcre.h
# mkdir /usr/include/pcre/.libs
# cp /usr/local/lib/libpcre.a /usr/include/pcre/.libs/libpcre.a
# cp /usr/local/lib/libpcre.a /usr/include/pcre/.libs/libpcre.la
# cp /root/pcre-7.9/pcre.h /usr/include/pcre/.libs/pcre.h

Nginx

http://nginx.net/

# http://sysoev.ru/nginx/nginx-0.7.62.tar.gz
# tar zxvf nginx-0.7.62.tar.gz
# cd /nginx-0.7.62
#./configure --prefix=/data_web/nginx-0.7.62/ \
--with-http_stub_status_module \
--with-http_gzip_static_module
vi objs/Makefile 删除“./configure –disable-shared”行
# make && make install
nginx

apache worker模式

四 6th

由gjw_apparitor发表在Web | 150 views

没有评论

ServerLimit 50 apache 进程数上限
ThreadLimit 110 apache 线程数上限
StartServers 5 apache 启动时默认建立的进程数
MaxClients 5000 最大并发数
MinSpareThreads 25 最小线程空闲数
MaxSpareThreads 200 最大线程空闲数
ThreadsPerChild 100 每个进程最多开启的线程
MaxRequestsPerChild 5000 指令用于控制服务器建立新进程和结束旧进程的频率

MaxRequestsPerChild 等于 MaxSpareThreads 或者 等于0 没有限制 最好不要设置为0防止内存溢出把服务拖死。
ServerLimit 大于 MaxClients/ThreadsPerChild
ThreadLimit 大于 MaxClients/ServerLimit
MaxSpareThreads 大于 ThreadsPerChild

apache

解决 Nginx处理404的SSI页面跳转的问题。

四 6th

由gjw_apparitor发表在Web | 202 views

没有评论

如果你的页面里SSI文件是用 “include virtual=”着种方式嵌套进去的。
你又配置了,错误页面跳转。
error_page 404 404.html
当你嵌套的页面不存在的时候就会发生整个页面变成404跳到404.html下了。

我们着一个技术很牛的同事想到的。

解决:

再域名的根目录创建个文本文件,里边的内容随意。我的是:
echo ‘‘ > ssi_404.txt

再nginx的配置文件里加上:
location ~* \.shtml$ {
error_page 404 ssi_404.txt;
}

这样有404的ssi页面就会显示这个内容,从而不会跳到404.html去了。

nginx, ssi

解决 php-fpm 504 Gateway Time-out

四 6th

由gjw_apparitor发表在Web | 433 views

没有评论

我的Discuz 论坛 的apache+php 换成了nginx+fastcgi , 最近一到访问量高峰的时候就会出现:
504 Gateway Time-out

调整nginx配置文件如下:

# vi nginx.conf
    fastcgi_buffers                  8 128K;
    send_timeout                           60;
    fastcgi_connect_timeout         300;
    fastcgi_send_timeout             300;
    fastcgi_read_timeout              300;
    fastcgi_buffer_size                128k;
    fastcgi_busy_buffers_size     256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors            on;
fastcgi, nginx

Nginx安装url_hash插件

四 6th

由gjw_apparitor发表在Web | 197 views

没有评论

简介:
url_hash 是nginx的第三方模块,nginx本身不支持,需要打patch .
Url_hash 你nginx在做负载均衡的时候。把转发的URL 以hash的形式保存。这样可以保证同一个URL始终
分给同一个real server,来提高访问速度。
为了确保能在 Nginx 中使用正则表达式进行更灵活的配置,安装之前需要确定系统是否安装有 PCRE(Perl Compatible Regular Expressions)包。您可以到 ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ 下载最新的 PCRE 源码包,使用下面命令下载编译和安装 PCRE 包:

软件列表:
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.7.tar.gz
wget http://sysoev.ru/nginx/nginx-0.7.57.tar.gz
wget http://wiki.nginx.org/images/7/78/Nginx_upstream_hash-0.3.tar.gz

更多 >

nginx
« 第一页...«89101112»...最后一页 »
    • 最新评论
    • 热门文章
    • 存档
    • 标签
    • 分类
    • Backup (2)
    • Code (6)
    • DB (1)
    • Django (2)
    • Linux (17)
    • Monitor (5)
    • Network (5)
    • Service (37)
      • Cache (8)
      • Dns (5)
      • Lvs (5)
      • Web (8)
    • Storage (1)
    • Troubleshooting (4)
    • Ubuntu (5)
    • Windows (1)
    • 安全 (3)
    • 转载 (8)
    apache awk backup base bind blog cacti crontab dig Dns expect explorer F5 fastcgi fonts free ftp iostat ip keepalived lvs MAC mail mpstat mysql nagios nginx openvpn resin sar sed selinux shell snmp sqlite Squid ssh ssi swap sysctl system tcp ubuntu wordpress 字符集
    • 2011 年十月 (2)
    • 2011 年九月 (3)
    • 2011 年八月 (1)
    • 2011 年七月 (4)
    • 2011 年六月 (1)
    • 2011 年五月 (5)
    • 2011 年四月 (69)
    • 2011 年三月 (13)
    • Nebula-5016、nebula-5024、netapp-3014对比测试报告 (2)
    • F5 3900 V10同步错误 (1)
    • ubuntu django+apache2 (1)
    • Apache HTTP Server畸形Range选项处理远程拒绝服务漏洞 (1)
    • fastkernel 设备测试 (1)
    • 建立自己的BLOG (0)
    • cacti画图Squid命中率 (0)
    • ping的通 telnet 不正常。 (0)
    • 修复sendmail 服务 (0)
    • 解决 Nginx处理404的SSI页面跳转的问题。 (0)
    • 通过tcpdump分析服务器初始的接收窗口大小: [...] LinkedIn [...]
    • diablo 3 demon hunter: Greetings! Quite useful assistance on this short article! It really is the tiny adjustments that...
    • gjw_apparitor: 更新: 厂商已经发布最新版本的Apache 2.2.20来修复此安全漏洞。请到厂商主站下载最新版本: http://httpd.apache.org/download.cgi 如果你的apache ...
    • guorui: 嗯.
    • gjw_apparitor: 呵呵!
    • guorui: 很详细....
  • 用户登录






    • 忘记你的密码?
  • 友情链接

    • 三斗室
    • 扶凯
    • 蚊子
由digitalnature提供主题Mystique | 由WordPress强力驱动
RSS订阅 XHTML 1.1 顶端