35 lines
726 B
Bash
35 lines
726 B
Bash
#!/bin/bash
|
|
|
|
curl -o web.zip https://fs.taufan.dev/public/jarkom/sayur_webserver_nginx.zip
|
|
unzip web.zip
|
|
mv sayur_webserver_nginx /var/www/sayur
|
|
|
|
service nginx start
|
|
service php7.2-fpm start
|
|
|
|
cat > /etc/nginx/sites-enabled/default <<EOL
|
|
server {
|
|
listen 8080;
|
|
listen [::]:8080;
|
|
|
|
root /var/www/sayur;
|
|
index index.php;
|
|
|
|
server_name brokoli.f01.com www.brokoli.f01.com buncis.f01.com www.buncis.f01.com bayam.f01.com www.bayam.f01.com;
|
|
|
|
error_log /var/log/nginx/error.log;
|
|
access_log /var/log/nginx/access.log;
|
|
|
|
location / {
|
|
try_files \$uri \$uri/ /index.php?\$query_string =404;
|
|
}
|
|
|
|
location ~ \.php\$ {
|
|
include snippets/fastcgi-php.conf;
|
|
|
|
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
|
|
}
|
|
}
|
|
EOL
|
|
|
|
nginx -s reload |