This commit is contained in:
Keanu Taufan 2024-10-24 21:31:33 +07:00
parent f53b43993a
commit 9aeb453743
No known key found for this signature in database
GPG Key ID: 1952D665A3A51BE0
2 changed files with 35 additions and 0 deletions

30
Dementor/20.sh Normal file
View 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
View 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