08-12-周三_14-20-35
This commit is contained in:
@@ -271,9 +271,10 @@ TIME-WAIT 0 0 [::ffff:127.0.0.1]:80 [::ffff:127.0.0.1]:33330
|
||||
- 使用ab进行压力测试,目前的apache默认的mpm模块是event支持上万并发,效果不明显
|
||||
|
||||
```bash
|
||||
[root@localhost ~]# ab -c 1000 -n 10000 http://127.0.0.1/
|
||||
[root@localhost ~]# ab -k -c 1000 -n 10000 http://127.0.0.1/
|
||||
# -c 即concurrency,用于指定的并发数
|
||||
# -n 即requests,用于指定压力测试总共的执行次数
|
||||
# -k 支持keepalive场景
|
||||
```
|
||||
|
||||
# 4. 虚拟主机
|
||||
|
||||
+2
-2
@@ -314,7 +314,7 @@ nginx: configuration file /etc/nginx/nginx.conf test is successful
|
||||
# 测试验证
|
||||
[root@localhost ~]# curl 172.16.175.129:8001
|
||||
Hello PC Website!
|
||||
[root@localhost ~]# curl -H 'Hostname: p.test.com' 172.16.175.129
|
||||
[root@localhost ~]# curl -H 'Hostname: m.test.com' 172.16.175.129
|
||||
Hello Moblie Website!
|
||||
[root@localhost ~]# curl 172.16.175.129:8003
|
||||
curl: (7) Failed to connect to 172.16.175.129 port 8003: Connection refused
|
||||
@@ -658,7 +658,7 @@ server {
|
||||
# 重新编译nginx,以前的配置文件不会丢失
|
||||
[root@localhost ~]# cd /usr/local/src
|
||||
[root@localhost src]# wget https://github.com/openresty/echo-nginx-module/archive/refs/heads/master.zip
|
||||
[root@localhost src]# unzip echo-nginx-module-master.zip
|
||||
|
||||
[root@localhost src]# mv echo-nginx-module-master echo-nginx-module
|
||||
[root@localhost src]# cd nginx-1.22.0
|
||||
[root@localhost nginx-1.22.0]# ./configure --prefix=/apps/nginx \
|
||||
|
||||
@@ -815,6 +815,7 @@ vrrp_instance VI_1 {
|
||||
priority 150 #优先级
|
||||
advert_int 1 #监测间隔时间
|
||||
#use_vmac #使用虚拟mac地址,因为路由问题,可能导致原本的IP不可用
|
||||
vmac_xmit_base
|
||||
authentication { #认证
|
||||
auth_type PASS #认证方式
|
||||
auth_pass 1111 #认证密码
|
||||
|
||||
Reference in New Issue
Block a user