Use sudo to remove default nginx index file

Added sudo to the rm command for deleting /var/www/html/index.nginx-debian.html to ensure proper permissions when removing the file.
This commit is contained in:
xixu-me committed 2025-07-16 00:51:49 +08:00
1 parent 4493c0ec4a
commit 1760d15d4e
1 file changed
+1 -1
+1 -1
View File
@@ -28,7 +28,7 @@ sudo chown -R "$USERNAME:$USERNAME" /var/www
sudo mkdir -p /var/www/html/.well-known/acme-challenge
sudo chown -R www-data:www-data /var/www/html
sudo chmod 755 /var/www/html/.well-known/acme-challenge
rm -f /var/www/html/index.nginx-debian.html
sudo rm -f /var/www/html/index.nginx-debian.html
# Create index.html
cat >/var/www/html/index.html <<'EOF'