write php test file
This commit is contained in:
10
lemp.sh
Normal file → Executable file
10
lemp.sh
Normal file → Executable file
@@ -114,10 +114,12 @@ sudo mv composer.phar /usr/bin/composer
|
||||
|
||||
# Configure Nginx for PHP
|
||||
echo "Configuring Nginx for PHP..."
|
||||
IP=`curl ip.llm.me`
|
||||
sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
|
||||
sudo cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.bak
|
||||
sudo cp ./nginx.conf /etc/nginx/nginx.conf
|
||||
sudo cp ./default.conf /etc/nginx/conf.d/default.conf
|
||||
sudo sed -i "s/localhost/$IP/g" /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Configure PHP
|
||||
echo "Configuring PHP..."
|
||||
@@ -131,6 +133,14 @@ sudo sed -i 's/;date.timezone =/date.timezone = "Asia\/Shanghai"/g' /etc/php.ini
|
||||
sudo sed -i 's/user = apache/user = nginx/g' /etc/php-fpm.d/www.conf
|
||||
sudo sed -i 's/group = apache/group = nginx/g' /etc/php-fpm.d/www.conf
|
||||
|
||||
# Write PHP test file
|
||||
echo "Write PHP test file..."
|
||||
cat >> /usr/share/nginx/html/i.php <<EOF
|
||||
<?php
|
||||
phpinfo();
|
||||
|
||||
EOF
|
||||
|
||||
# Configure MariaDB
|
||||
echo "Configuring MariaDB..."
|
||||
sudo cp ./my.cnf /etc/my.cnf
|
||||
|
||||
Reference in New Issue
Block a user