task 20
This commit is contained in:
parent
f53b43993a
commit
9aeb453743
30
Dementor/20.sh
Normal file
30
Dementor/20.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
cat > /etc/nginx/sites-enabled/default <<EOL
|
||||
upstream backend {
|
||||
least_conn;
|
||||
server 10.67.6.4; # IP LunaLovegood
|
||||
server 10.67.6.3; # IP FiliusFlitwick
|
||||
server 10.67.6.14; # IP ChoChang (setelah nomor 5)
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name _;
|
||||
|
||||
error_log /var/log/nginx/error.log;
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
location / {
|
||||
proxy_pass http://backend;
|
||||
proxy_bind 10.67.4.4;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host \$http_host;
|
||||
}
|
||||
}
|
||||
EOL
|
||||
|
||||
nginx -s reload
|
||||
5
SusanBones/20.sh
Normal file
5
SusanBones/20.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo '{"username":"f01","password":"f01f01"}' > temp.json
|
||||
ab -n 100 -c 10 -T application/json -p temp.json -v 4 http://ravenclaw.hogwarts.f01.com/api/auth/login
|
||||
rm temp.json
|
||||
Loading…
Reference in New Issue
Block a user