Compare commits

..

No commits in common. "9aeb4537431b5a22b52269c0329795cd5909ee4b" and "1b4bbe712e19654c00b41bc65244cbd07054ee4b" have entirely different histories.

11 changed files with 0 additions and 258 deletions

View File

@ -1,6 +1,5 @@
#!/bin/bash
echo "nameserver 192.168.122.1" > /etc/resolv.conf
git clone https://github.com/lodaogos/laravel-jarkom-modul-3.git
mv laravel-jarkom-modul-3 /var/www
cp /var/www/laravel-jarkom-modul-3/.env.example /var/www/laravel-jarkom-modul-3/.env

View File

@ -1,59 +0,0 @@
#!/bin/bash
groupadd modified_user
useradd -g modified_user modified_user
chown -R modified_user.modified_user /var/www/laravel-jarkom-modul-3/storage
cat > /etc/php/8.0/fpm/pool.d/modified.conf <<EOL
[modified_site]
user = modified_user
group = modified_user
listen = /var/run/php8.0-fpm-modified-site.sock
listen.owner = www-data
listen.group = www-data
php_admin_value[disable_functions] = exec,passthru,shell_exec,system
php_admin_flag[allow_url_fopen] = off
; Choose how the process manager will control the number of child processes.
pm = dynamic
pm.max_children = 150
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 100
pm.process_idle_timeout = 10s
EOL
cat > /etc/nginx/sites-available/default <<EOL
server {
listen 80;
listen [::]:80;
server_name _;
root /var/www/laravel-jarkom-modul-3/public;
index index.php index.html index.htm;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
location / {
try_files \$uri \$uri/ /index.php?\$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php8.0-fpm-modified-site.sock;
}
location ~ /\.ht {
deny all;
}
}
EOL
/etc/init.d/php8.0-fpm restart
service nginx restart

View File

@ -1,31 +0,0 @@
#!/bin/bash
service nginx start
cat > /etc/nginx/sites-enabled/default <<EOL
upstream backend {
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

View File

@ -1,30 +0,0 @@
#!/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

View File

@ -1,5 +0,0 @@
#!/bin/bash
echo "nameserver 192.168.122.1" > /etc/resolv.conf
apt-get update
apt-get install nginx -y

View File

@ -1,10 +1,8 @@
#!/bin/bash
echo "nameserver 192.168.122.1" > /etc/resolv.conf
git clone https://github.com/lodaogos/laravel-jarkom-modul-3.git
mv laravel-jarkom-modul-3 /var/www
cp /var/www/laravel-jarkom-modul-3/.env.example /var/www/laravel-jarkom-modul-3/.env
chown -R www-data.www-data /var/www/laravel-jarkom-modul-3/storage
sed -i 's/DB_HOST=127.0.0.1/DB_HOST=10.67.4.2/g' /var/www/laravel-jarkom-modul-3/.env
sed -i 's/DB_DATABASE=laravel/DB_DATABASE=dbkelompokf01/g' /var/www/laravel-jarkom-modul-3/.env

View File

@ -1,59 +0,0 @@
#!/bin/bash
groupadd modified_user
useradd -g modified_user modified_user
chown -R modified_user.modified_user /var/www/laravel-jarkom-modul-3/storage
cat > /etc/php/8.0/fpm/pool.d/modified.conf <<EOL
[modified_site]
user = modified_user
group = modified_user
listen = /var/run/php8.0-fpm-modified-site.sock
listen.owner = www-data
listen.group = www-data
php_admin_value[disable_functions] = exec,passthru,shell_exec,system
php_admin_flag[allow_url_fopen] = off
; Choose how the process manager will control the number of child processes.
pm = dynamic
pm.max_children = 150
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 100
pm.process_idle_timeout = 10s
EOL
cat > /etc/nginx/sites-available/default <<EOL
server {
listen 80;
listen [::]:80;
server_name _;
root /var/www/laravel-jarkom-modul-3/public;
index index.php index.html index.htm;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
location / {
try_files \$uri \$uri/ /index.php?\$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php8.0-fpm-modified-site.sock;
}
location ~ /\.ht {
deny all;
}
}
EOL
/etc/init.d/php8.0-fpm restart
service nginx restart

View File

@ -1,10 +1,8 @@
#!/bin/bash
echo "nameserver 192.168.122.1" > /etc/resolv.conf
git clone https://github.com/lodaogos/laravel-jarkom-modul-3.git
mv laravel-jarkom-modul-3 /var/www
cp /var/www/laravel-jarkom-modul-3/.env.example /var/www/laravel-jarkom-modul-3/.env
chown -R www-data.www-data /var/www/laravel-jarkom-modul-3/storage
sed -i 's/DB_HOST=127.0.0.1/DB_HOST=10.67.4.2/g' /var/www/laravel-jarkom-modul-3/.env
sed -i 's/DB_DATABASE=laravel/DB_DATABASE=dbkelompokf01/g' /var/www/laravel-jarkom-modul-3/.env

View File

@ -1,59 +0,0 @@
#!/bin/bash
groupadd modified_user
useradd -g modified_user modified_user
chown -R modified_user.modified_user /var/www/laravel-jarkom-modul-3/storage
cat > /etc/php/8.0/fpm/pool.d/modified.conf <<EOL
[modified_site]
user = modified_user
group = modified_user
listen = /var/run/php8.0-fpm-modified-site.sock
listen.owner = www-data
listen.group = www-data
php_admin_value[disable_functions] = exec,passthru,shell_exec,system
php_admin_flag[allow_url_fopen] = off
; Choose how the process manager will control the number of child processes.
pm = dynamic
pm.max_children = 150
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 100
pm.process_idle_timeout = 10s
EOL
cat > /etc/nginx/sites-available/default <<EOL
server {
listen 80;
listen [::]:80;
server_name _;
root /var/www/laravel-jarkom-modul-3/public;
index index.php index.html index.htm;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
location / {
try_files \$uri \$uri/ /index.php?\$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php8.0-fpm-modified-site.sock;
}
location ~ /\.ht {
deny all;
}
}
EOL
/etc/init.d/php8.0-fpm restart
service nginx restart

View File

@ -1,5 +0,0 @@
#!/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

View File

@ -1,5 +0,0 @@
#!/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