4.4/5 - (9 bình chọn)

Tóm tắt tính năng:

  • Tạo package có tùy chọn Install WordPress
  • Tự động cài đặt wordpress khi tạo user (nếu package có bật tùy chọn)
  • Tự động cài đặt wordpress khi thêm tên miền, tick chọn cài hoặc không
  • Cài wordpress cho tên miền đã thêm vào
  • Tự động cài đặt wordpress khi thêm sub domain

Rất hữu ích cho các bạn làm wordpress hosting, làm web demo trên sub domain

Hướng dẫn cài đặt

Để cài đặt chúng ta sẽ login vào SSH và SFTP nhé, công cụ kết nối là bitvise / MobaXterm cho windows, Terminus cho Mac

bnixvn doc photo 2024 09 12 15 29 50

Miễn phí cài đặt Directadmin + Auto Install WordPress khi mua VPS tại BNIX.VN

VPS NVme – 4 vCPU – 8GB RAM – 65GB NVme chỉ 999k/năm

Bước 1: Cài đặt WP-CLI

Trong SSH chúng ta chạy các lệnh sau để cài đặt WP-CLI

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp

Bước 2: Thêm tùy chọn cho package

bnixvn doc option for package

Để thêm tùy chọn cho package (gói hosting), các bạn chạy lệnh sau:

touch /usr/local/directadmin/data/admin/custom_package_items.conf
nano /usr/local/directadmin/data/admin/custom_package_items.conf

Tiếp đó điền nội dung sau vào, bấm Ctrl + O và Ctrl + X để save và đóng lại

installWP=type=checkbox&string=Install WordPress&desc=Automatically install WordPress with this User Package&checked=yes

Phân quyền cho file vừa tạo

chown diradmin. /usr/local/directadmin/data/admin/custom_package_items.conf
chmod 700 /usr/local/directadmin/data/admin/custom_package_items.conf

Bước 3: Thêm tùy chọn cho tên miền

bnixvn doc option for domain

Thêm tùy chọn cho tên miền

touch /usr/local/directadmin/data/admin/custom_domain_items.conf
nano /usr/local/directadmin/data/admin/custom_domain_items.conf

Tiếp đó điền nội dung sau vào, bấm Ctrl + O và Ctrl + X để save và đóng lại

installWP=type=checkbox&string=Install WordPress&desc=Automatically install WordPress for this domain&checked=no

Phân quyền cho file cấu hình vừa tạo

chown diradmin. /usr/local/directadmin/data/admin/custom_domain_items.conf
chmod 700 /usr/local/directadmin/data/admin/custom_domain_items.conf

Bước 4: Tạo Script cài đặt WordPress

* Script cho bước thêm User:

Chúng ta chạy lệnh sau để tạo file script

touch /usr/local/directadmin/scripts/custom/user_create_post.sh
nano /usr/local/directadmin/scripts/custom/user_create_post.sh

Sau đó điền mã Script sau vào

#!/bin/bash
# CHECK CUSTOM PKG ITEM INSTALLWP
if [[ $installWP != 'ON' ]]; then
  exit 0;
else

# ENABLE ERROR LOGGING
# exec 2>/usr/local/directadmin/customscripts.error.log

# SET UP DATABASE VARIABLES
dbpass=$(openssl rand -base64 12) > /dev/null
ext=$(openssl rand -hex 2) > /dev/null
dbuser="wp${ext}"    # do not include the username_ for dataskq here as DA adds this
wpconfigdbuser="${username}_wp${ext}"
wpadminpass=$(openssl rand -base64 14) > /dev/null

# CHECK IF WORDPRESS EXISTS
if [ -f /home/$username/domains/$domain/public_html/index.php ]; then
    echo "WARNING: There appears to be an index file already located in this directory, which indicates that an installation is already present! Empty the directory before running the script again."
    exit
else

# DISABLE DIRECTADMIN INDEX.HTML FILE
if [ -f /home/$username/domains/$domain/public_html/index.html ]; then
    mv /home/$username/domains/$domain/public_html/index.html{,.bak}
fi

# CREATE DATABASE
/usr/bin/mysqladmin -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2) create ${wpconfigdbuser}

# Tạo MySQL user và cấp quyền đầy đủ cho database
echo "CREATE USER '${wpconfigdbuser}'@'localhost' IDENTIFIED BY '${dbpass}';" | mysql -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2)
echo "GRANT ALL PRIVILEGES ON ${wpconfigdbuser}.* TO '${wpconfigdbuser}'@'localhost';" | mysql -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2)
echo "FLUSH PRIVILEGES;" | mysql -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2)

# DOWNLOAD WORDPRESS
cd /home/$username/domains/$domain/public_html/
su -s /bin/bash -c "/usr/local/bin/wp core download" $username

# SET DATABASE DETAILS IN THE CONFIG FILE
su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=$wpconfigdbuser --dbuser=$wpconfigdbuser --dbpass=$dbpass --dbhost=localhost" $username

# INSTALL WORDPRESS

su -s /bin/bash -c "/usr/local/bin/wp core install --url=https://$domain/ --admin_user=$username --admin_password=$wpadminpass --title=\"$domain\" --admin_email=$username@$domain " $username
su -s /bin/bash -c "/usr/local/bin/wp rewrite structure '/%postname%/'" $username
printf "\n\nWORDPRESS LOGIN CREDENTIALS:\nURL: https://$domain/wp-admin/\nUSERNAME: $username\nPASSWORD: $wpadminpass\n\n"

if [[ ! -h /home/$username/domains/$domain/private_html ]]; then
	echo "Making a symlink for https..."
	cd /home/$username/domains/$domain/
	rm -rf private_html
	su -s /bin/bash -c "ln -s public_html private_html" $username
fi

# ADD LOGIN DETAILS TO TEXT FILE
printf "\n\nWORDPRESS LOGIN CREDENTIALS:\nURL: https://$domain/wp-admin/\nUSERNAME: $username\nPASSWORD: $wpadminpass\n\n" >> /home/$username/domains/$domain/public_html/.wp-details.txt
chown $username. /home/$username/domains/$domain/public_html/.wp-details.txt
fi

# DELETE DOLLY PLUGIN AND INSTALL LITESPEED CACHE
su -s /bin/bash -c "/usr/local/bin/wp plugin delete hello" $username
su -s /bin/bash -c "/usr/local/bin/wp plugin delete akismet" $username


# CREATE .HTACCESS
cat << EOF > /home/$username/domains/$domain/public_html/.htaccess
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
EOF
chown $username. /home/$username/domains/$domain/public_html/.htaccess

# CHANGE FILE PERMISSIONS
cd /home/$username/domains/$domain/public_html/
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;

# WORDPRESS SECURITY AND HARDENING
chmod 400 /home/$username/domains/$domain/public_html/.wp-details.txt
chmod 400 /home/$username/domains/$domain/public_html/wp-config.php

fi
exit 0;

Tiếp theo là phân quyền cho script

chown diradmin.diradmin /usr/local/directadmin/scripts/custom/user_create_post.sh
chmod 700 /usr/local/directadmin/scripts/custom/user_create_post.sh

* Script Cho bước thêm tên miền (Addon Domain)

Tạo file script

touch /usr/local/directadmin/scripts/custom/domain_create_post.sh
nano /usr/local/directadmin/scripts/custom/domain_create_post.sh

Thêm nội dung sau cho file script (khá giống với bước add user)

#!/bin/bash
# CHECK CUSTOM PKG ITEM INSTALLWP
if [[ $installWP != 'ON' ]]; then
  exit 0;
else

# ENABLE ERROR LOGGING
# exec 2>/usr/local/directadmin/customscripts.error.log

# SET UP DATABASE VARIABLES
dbpass=$(openssl rand -base64 12) > /dev/null
ext=$(openssl rand -hex 2) > /dev/null
dbuser="wp${ext}"    # do not include the username_ for dataskq here as DA adds this
wpconfigdbuser="${username}_wp${ext}"
wpadminpass=$(openssl rand -base64 14) > /dev/null

# CHECK IF WORDPRESS EXISTS
if [ -f /home/$username/domains/$domain/public_html/index.php ]; then
    echo "WARNING: There appears to be an index file already located in this directory, which indicates that an installation is already present! Empty the directory before running the script again."
    exit
else

# DISABLE DIRECTADMIN INDEX.HTML FILE
if [ -f /home/$username/domains/$domain/public_html/index.html ]; then
    mv /home/$username/domains/$domain/public_html/index.html{,.bak}
fi

# CREATE DATABASE
/usr/bin/mysqladmin -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2) create ${wpconfigdbuser}

# Tạo MySQL user và cấp quyền đầy đủ cho database
echo "CREATE USER '${wpconfigdbuser}'@'localhost' IDENTIFIED BY '${dbpass}';" | mysql -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2)
echo "GRANT ALL PRIVILEGES ON ${wpconfigdbuser}.* TO '${wpconfigdbuser}'@'localhost';" | mysql -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2)
echo "FLUSH PRIVILEGES;" | mysql -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2)

# DOWNLOAD WORDPRESS
cd /home/$username/domains/$domain/public_html/
su -s /bin/bash -c "/usr/local/bin/wp core download" $username

# SET DATABASE DETAILS IN THE CONFIG FILE
su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=$wpconfigdbuser --dbuser=$wpconfigdbuser --dbpass=$dbpass --dbhost=localhost" $username

# INSTALL WORDPRESS

su -s /bin/bash -c "/usr/local/bin/wp core install --url=https://$domain/ --admin_user=$username --admin_password=$wpadminpass --title=\"$domain\" --admin_email=$username@$domain " $username
su -s /bin/bash -c "/usr/local/bin/wp rewrite structure '/%postname%/'" $username
printf "\n\nWORDPRESS LOGIN CREDENTIALS:\nURL: https://$domain/wp-admin/\nUSERNAME: $username\nPASSWORD: $wpadminpass\n\n"

if [[ ! -h /home/$username/domains/$domain/private_html ]]; then
	echo "Making a symlink for https..."
	cd /home/$username/domains/$domain/
	rm -rf private_html
	su -s /bin/bash -c "ln -s public_html private_html" $username
fi


# ADD LOGIN DETAILS TO TEXT FILE
printf "\n\nWORDPRESS LOGIN CREDENTIALS:\nURL: https://$domain/wp-admin/\nUSERNAME: $username\nPASSWORD: $wpadminpass\n\n" >> /home/$username/domains/$domain/public_html/.wp-details.txt
chown $username. /home/$username/domains/$domain/public_html/.wp-details.txt
fi

# DELETE DOLLY PLUGIN AND INSTALL LITESPEED CACHE
su -s /bin/bash -c "/usr/local/bin/wp plugin delete hello" $username
su -s /bin/bash -c "/usr/local/bin/wp plugin delete akismet" $username


# CREATE .HTACCESS
cat << EOF > /home/$username/domains/$domain/public_html/.htaccess
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
EOF
chown $username. /home/$username/domains/$domain/public_html/.htaccess

# CHANGE FILE PERMISSIONS
cd /home/$username/domains/$domain/public_html/
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;

# WORDPRESS SECURITY AND HARDENING
chmod 400 /home/$username/domains/$domain/public_html/.wp-details.txt
chmod 400 /home/$username/domains/$domain/public_html/wp-config.php

fi
exit 0;

Phân quyền cho script

chown diradmin.diradmin /usr/local/directadmin/scripts/custom/domain_create_post.sh
chmod 700 /usr/local/directadmin/scripts/custom/domain_create_post.sh

* Script cho chỉnh sửa tên miền cũ

Có những tên miền cũ đã thêm trước script này hoặc không tick Install ở bước thêm tên miền, giờ chỉ cần Edit tên miền, tick vào tùy chọn Install WordPress rồi Save lại là nó sẽ cài cho chúng ta

Tạo file script

touch /usr/local/directadmin/scripts/custom/domain_modify_post.sh
nano /usr/local/directadmin/scripts/custom/domain_modify_post.sh

Thêm nội dung sau vào script

#!/bin/bash
# CHECK CUSTOM PKG ITEM INSTALLWP
if [[ $installWP != 'ON' ]]; then
  exit 0;
else

  # ENABLE ERROR LOGGING
  # exec 2>/usr/local/directadmin/customscripts.error.log

  # MOVE CONTENTS TO BACKUP FOLDER
  mkdir -p /home/$username/wp-backup/$domain-backup
  mv /home/$username/domains/$domain/public_html/* /home/$username/wp-backup/$domain-backup
  chown -R $username. /home/$username/wp-backup

  # SET UP DATABASE VARIABLES
  dbpass=$(openssl rand -base64 12) > /dev/null
  ext=$(openssl rand -hex 2) > /dev/null
  dbuser="wp${ext}"    # do not include the username_ for dataskq here as DA adds this
  wpconfigdbuser="${username}_wp${ext}"
  wpadminpass=$(openssl rand -base64 14) > /dev/null

  # CREATE DATABASE
  /usr/bin/mysqladmin -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2) create ${username}_${dbuser}

  # Tạo MySQL user và cấp quyền đầy đủ cho database
  echo "CREATE USER '${username}_${dbuser}'@'localhost' IDENTIFIED BY '${dbpass}';" | mysql -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2)
  echo "GRANT ALL PRIVILEGES ON ${username}_${dbuser}.* TO '${username}_${dbuser}'@'localhost';" | mysql -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2)
  echo "FLUSH PRIVILEGES;" | mysql -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2)

  # DOWNLOAD WORDPRESS
  cd /home/$username/domains/$domain/public_html/
  su -s /bin/bash -c "/usr/local/bin/wp core download" $username

  # SET DATABASE DETAILS IN THE CONFIG FILE
  su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=${username}_${dbuser} --dbuser=${username}_${dbuser} --dbpass=$dbpass --dbhost=localhost" $username

  # INSTALL WORDPRESS

su -s /bin/bash -c "/usr/local/bin/wp core install --url=https://$domain/ --admin_user=$username --admin_password=$wpadminpass --title=\"$domain\" --admin_email=$username@$domain " $username
su -s /bin/bash -c "/usr/local/bin/wp rewrite structure '/%postname%/'" $username
printf "\n\nWORDPRESS LOGIN CREDENTIALS:\nURL: https://$domain/wp-admin/\nUSERNAME: $username\nPASSWORD: $wpadminpass\n\n"

if [[ ! -h /home/$username/domains/$domain/private_html ]]; then
  echo "Making a symlink for https..."
  cd /home/$username/domains/$domain/
  rm -rf private_html
  su -s /bin/bash -c "ln -s public_html private_html" $username
fi

  # ADD LOGIN DETAILS TO TEXT FILE
  printf "\n\nWORDPRESS LOGIN CREDENTIALS:\nURL: https://$domain/wp-admin/\nUSERNAME: $username\nPASSWORD: $wpadminpass\n\n" >> /home/$username/domains/$domain/public_html/.wp-details.txt
  chown $username. /home/$username/domains/$domain/public_html/.wp-details.txt
fi  # Kết thúc khối `if` kiểm tra $installWP

# DELETE DOLLY PLUGIN AND INSTALL LITESPEED CACHE
su -s /bin/bash -c "/usr/local/bin/wp plugin delete hello" $username
su -s /bin/bash -c "/usr/local/bin/wp plugin delete akismet" $username

# CREATE .HTACCESS
cat << EOF > /home/$username/domains/$domain/public_html/.htaccess
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
EOF
chown $username. /home/$username/domains/$domain/public_html/.htaccess

# CHANGE FILE PERMISSIONS
cd /home/$username/domains/$domain/public_html/
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;

# WORDPRESS SECURITY AND HARDENING
chmod 400 /home/$username/domains/$domain/public_html/.wp-details.txt
chmod 400 /home/$username/domains/$domain/public_html/wp-config.php

exit 0;  # Kết thúc script

Phân quyền cho file script

chown diradmin.diradmin /usr/local/directadmin/scripts/custom/domain_modify_post.sh
chmod 700 /usr/local/directadmin/scripts/custom/domain_modify_post.sh 
Lưu ý: Sau khi bạn xác nhận các thay đổi của mình đối với một tên miền hiện có trong DirectAdmin, bạn sẽ nhận được thông báo ở góc dưới bên phải xác nhận rằng tên miền đã được thay đổi. Tuy nhiên, thông tin đăng nhập tài khoản WordPress mới sẽ không được hiển thị trên màn hình như khi thêm tên miền mới. Thay vào đó, chúng sẽ được lưu dưới dạng tệp .wp-details.txt trong public_html thư mục tên miền.

* Script cho sub domain

Cái này áp dụng cho các bạn làm demo bằng sub domain nè.

Tạo file script

touch /usr/local/directadmin/scripts/custom/subdomain_create_post.sh
nano /usr/local/directadmin/scripts/custom/subdomain_create_post.sh

Thêm nội dung sau cho script

#!/bin/bash

# ENABLE ERROR LOGGING
# exec 2>/usr/local/directadmin/customscripts.error.log

# SET UP DATABASE VARIABLES
dbpass=$(openssl rand -base64 12) > /dev/null
ext=$(openssl rand -hex 2) > /dev/null
dbuser="wp${ext}"    # do not include the username_ for dataskq here as DA adds this
wpconfigdbuser="${username}_wp${ext}"
wpadminpass=$(openssl rand -base64 14) > /dev/null

# CHECK IF WORDPRESS EXISTS
if [ -f /home/$username/domains/$domain/public_html/$subdomain/index.php ]; then
    echo "WARNING: There appears to be an index file already located in this directory, which indicates that an installation is already present! Empty the directory before running the script again."
    exit
else

# DISABLE DIRECTADMIN INDEX.HTML FILE
if [ -f /home/$username/domains/$domain/public_html/$subdomain/index.html ]; then
    mv /home/$username/domains/$domain/public_html/$subdomain/index.html{,.bak}
fi

# CREATE DATABASE
/usr/bin/mysqladmin -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2 ) create ${wpconfigdbuser};
echo "CREATE USER '${wpconfigdbuser}'@'localhost' IDENTIFIED BY '${dbpass}';" | mysql -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2);
echo "GRANT ALL PRIVILEGES ON ${wpconfigdbuser}.* TO '${wpconfigdbuser}'@'localhost';" | mysql -uda_admin -p$(cat /usr/local/directadmin/conf/mysql.conf | grep pass | cut -d\= -f2);

# DOWNLOAD WORDPRESS
cd /home/$username/domains/$domain/public_html/$subdomain/
su -s /bin/bash -c "/usr/local/bin/wp core download" $username

# SET DATABASE DETAILS IN THE CONFIG FILE
su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=$wpconfigdbuser --dbuser=$wpconfigdbuser --dbpass=$dbpass --dbhost=localhost" $username

# INSTALL WORDPRESS

su -s /bin/bash -c "/usr/local/bin/wp core install --url=https://$subdomain.$domain/ --admin_user=$username --admin_password=$wpadminpass --title=\"$subdomain.$domain\" --admin_email=$username@$domain" $username
su -s /bin/bash -c "/usr/local/bin/wp rewrite structure '/%postname%/'" $username
printf "\n\nWORDPRESS LOGIN CREDENTIALS:\nURL: https://$subdomain.$domain/wp-admin/\nUSERNAME: $username\nPASSWORD: $wpadminpass\n\n"


# ADD LOGIN DETAILS TO TEXT FILE
printf "\n\nWORDPRESS LOGIN CREDENTIALS:\nURL: https://$subdomain.$domain/wp-admin/\nUSERNAME: $username\nPASSWORD: $wpadminpass\n\n" >> /home/$username/domains/$domain/public_html/$subdomain/.wp-details.txt
chown $username. /home/$username/domains/$domain/public_html/$subdomain/.wp-details.txt

# DELETE DOLLY PLUGIN AND INSTALL LITESPEED CACHE
su -s /bin/bash -c "/usr/local/bin/wp plugin delete hello" $username
su -s /bin/bash -c "/usr/local/bin/wp plugin delete akismet" $username

# CREATE .HTACCESS
cat << EOF > /home/$username/domains/$domain/public_html/$subdomain/.htaccess
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
EOF
chown $username. /home/$username/domains/$domain/public_html/$subdomain/.htaccess

# CHANGE FILE PERMISSIONS
cd /home/$username/domains/$domain/public_html/$subdomain/
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;

# WORDPRESS SECURITY AND HARDENING
chmod 400 /home/$username/domains/$domain/public_html/$subdomain/.wp-details.txt
chmod 400 /home/$username/domains/$domain/public_html/$subdomain/wp-config.php

fi
exit 0;

Phân quyền cho file script

chown diradmin.diradmin /usr/local/directadmin/scripts/custom/subdomain_create_post.sh
chmod 700 /usr/local/directadmin/scripts/custom/subdomain_create_post.sh
Lưu ý: File script này áp dụng cho Directadmin bản cũ, subdomain lưu tại thư mục nằm trong public_html. Bản Directadmin có thư mục nằm ở thư mục domains (ngang hàng domain chính) cần phải sửa lại

* Sửa lỗi /bin/bash^M: bad interpreter (nếu có)

Lỗi này sinh ra do trình editor không khớp với shell linux. Sửa bằng cách chạy các lệnh sau:

sed -i 's/\r$//' /usr/local/directadmin/scripts/custom/domain_create_post.sh
sed -i 's/\r$//' /usr/local/directadmin/scripts/custom/subdomain_create_post.sh
sed -i 's/\r$//' /usr/local/directadmin/scripts/custom/domain_modify_post.sh
sed -i 's/\r$//' /usr/local/directadmin/scripts/custom/user_create_post.sh
Lưu ý chung: Tất cả đều cài dạng https, nên sau khi cài đặt, các bạn phải cài đặt thêm chứng chỉ SSL cho tên miền hoặc tên miền con (subdomain) nhé

Trên là toàn bộ quá trình cài đặt tính năng, các bạn có thể tự cài rồi trải nghiệm

Hướng dẫn sử dụng

Đang cập nhật, nhưng các bạn có thể xem qua Video demo ở trên

Khuyến mãi

bnixvn doc photo 2024 09 12 15 29 50

Miễn phí cài đặt Directadmin + Auto Install WordPress khi mua VPS tại BNIX.VN

VPS NVme – 4 vCPU – 8GB RAM – 65GB NVme chỉ 999k/năm

Để lại một bình luận

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *