1234567891011121314151617181920 |
- #!/usr/bin/env bash
- [[ $fpm_listen =~ (.*):([[:digit:]]+) ]] && \
- { ip=${BASH_REMATCH[1]}; port=${BASH_REMATCH[2]}; } || \
- { ip=127.0.0.1; port=$fpm_listen; }
- $userdo bash -c "cat <<- CONF > /etc/nginx/default.d/info.conf
- location = /info.php {
- root /var/www;
- fastcgi_split_path_info ^(.+.php)(/.+)$;
- fastcgi_pass $ip:$port;
- #fastcgi_index info.php;
- include fastcgi.conf;
- }
- CONF"
- $user_do bash -c 'echo "<?php phpinfo();" > /var/www/info.php'
- $user_do systemctl enable nginx
- $user_do systemctl start nginx
- $user_do systemctl status nginx
|