Fix nginx restart failed.

This commit is contained in:
BoHung Chiu 2022-05-24 15:46:03 +08:00
parent e5a70ec01c
commit 10e382f9f7
1 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,11 @@ sudo apt-get install -y postfix
sudo service postfix start
#install nginx 1.18
sudo apt install nginx -y
sudo nginx -t
nginx_status="$(echo $?)"
if [ $nginx_status != 0 ]; then
sudo sed -i 's/\([^#]include \/etc\/nginx\/sites-enabled\/*\)/\#\1/g' /etc/nginx/nginx.conf
fi
sudo service nginx restart
cd /etc/nginx/
sudo mkdir orbit_sites/