浏览 2.6k
nginx 版本 1.22.1
配置文件是特别简单的官方例子
server
{
listen 80;
server_name n.youtayouta.cn;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/n.youtayouta.cn;
#CERT-APPLY-CHECK--START
# 用于SSL证书申请时的文件验证相关配置 -- 请勿删除
include /www/server/panel/vhost/nginx/well-known/n.youtayouta.cn.conf;
include enable-php-00.conf;
#PHP-INFO-END
#REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效
include /www/server/panel/vhost/rewrite/n.youtayouta.cn.conf;
location / {
mirror /mirror;
proxy_pass http://test2.youtayouta.cn;
}
location = /mirror {
internal;
proxy_pass http://test.youtayouta.cn$request_uri;
}
access_log /www/wwwlogs/n.youtayouta.cn.log;
error_log /www/wwwlogs/n.youtayouta.cn.error.log;
}
流量并没有复制到 http://test.youtayouta.cn 不知道什么原因.

按点赞数排序
按时间排序
sticky模块只能在linux下吧,win下没有。tomcat好像有个session复制吧,或者可以用共享session。
没办法完全不受影响的,因为mirror是子请求,当子请求未结束时,主请求消耗的内存至少是无法释放的。你可以尝试在/mirror里,把超时时间大幅度调低,包括connect/read/send,再压下看看。
微信公众号
加入微信群