task 19
This commit is contained in:
parent
ef5555948a
commit
f53b43993a
59
ChoChang/19.sh
Normal file
59
ChoChang/19.sh
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#!/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
|
||||||
5
Dementor/setup.sh
Normal file
5
Dementor/setup.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "nameserver 192.168.122.1" > /etc/resolv.conf
|
||||||
|
apt-get update
|
||||||
|
apt-get install nginx -y
|
||||||
59
FiliusFlitwick/19.sh
Normal file
59
FiliusFlitwick/19.sh
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#!/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
|
||||||
59
LunaLovegood/19.sh
Normal file
59
LunaLovegood/19.sh
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#!/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
|
||||||
5
SusanBones/19.sh
Normal file
5
SusanBones/19.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