This script automates updating domain configurations in Vesta Control Panel (Vestacp), making it easier to addon domains
-
Access your Vestacp using root via SSH
Ensure you have SSH access to your server with root privileges.
-
Put this script in the /home/admin/conf/web
Place the
addon.php
script in the/home/admin/conf/web
directory on your server. -
Run this script
php addon.php
Execute the script
addon.php
using PHP. This script will update the domain configurations based on the settings specified within. -
Restart Apache
Depending on your server's operating system, restart Apache to apply the changes:
-
For CentOS 7:
sudo systemctl restart httpd.service
-
For Ubuntu:
sudo systemctl restart apache2
-
Before executing the script, back up all .conf
files in the /home/user/conf/web
directory. This precautionary measure helps prevent any potential data loss or unexpected outcomes due to misconfigurations.
Feel free to reach out if you encounter any issues or have any questions!