Bulk adding of domains in ispmanager 6
To bulk add domains in ispmanager 6, you can use this script. The script allows you to add domains via the CLI in a semi-automated mode.
To bulk add domains, follow these steps:
- Connect to the server via SSH as the root user;
- Download and place the script in any accessible directory, such as
/root; - Make the script executable by running
chmod +x add_domains_ispmgr.sh; - Prepare and place a text file named domains.txt next to it, containing the names of the desired domains (one line per domain);
- Run the script with the command
./sh add_domains_ispmgr.shand go through all the steps for each domain:- Enter the username of the user the domain will be added to;
- Select a handler;
- Select the handler mode;
- Determine whether to add a Let's Encrypt SSL certificate.
For example, this is what adding the domain domain.com with PHP-FPM mode and issuing a certificate for user user01 would look like:
Processing domain: domain.com
========================================
Enter user for the domain (domain.com ) [default: www-root]:
User exists: user01
✓ SSL certificates allowed for user user01
Available technologies for user user01:
1) php
2) nodejs
3) python
#? 1
Selected technology: php
Available PHP modes:
1) php_mode_fcgi_nginxfpm
2) php_mode_cgi
3) php_mode_mod
#? 1
Using PHP mode: php_mode_fcgi_nginxfpm
Creating domain 'domain.com' with user 'user01'...
Docroot: /var/www/user01/data/www/domain.com
Parameters: php=on php_mode=php_mode_fcgi_nginxfpm
✓ Domain created successfully.
SSL Certificate:
Request SSL certificate for this domain? (y/n) [default: y]: y
Requesting SSL certificate for domain 'domain.com'...
✓ SSL certificate requested successfully.