Hi, I want to set up a new ispconfig 3 server. Now I have one big problem - for one web domain, I have > 1000 alias-domains. Is there any way to import a list of alias domains inside ispconfig? Or is there any other way to do this? Maybe directly through mysql queries? Have a nice evening!
Hi, you can use the api for this. Just check out the examples in the api client directory of your ispconfig download. There should be a sample file for creating domain alias. remoting_client/examples/sites_web_aliasdomain_add.php Just extend this file to loop through an array (or import a csv). Dont forget to create a remote user in ispconfig that has the rights to create the domains
Hi Marius, thank your for your reply. This is a great hint! I will try to use this. Thought, that it could be easier to just create a mysql query, as it seems, that all the alias domains are just in one table without links to other tables?!
Oh no Please do not use mysql queries. If you would do this, the alias domains would not be created inside the apache vhost. For this the system needs a datalog entry that would not be created then.
Some values are NULL Hi again, know I tried the script mentioned by Marius. I am wondering, that some values in the database are set to NULL while they have string values when I create an alias through the web gui itself. As I want to create the alias-domains without a redirect, I am not sure if this can cause problems?! All this fields are set to NULL in the database independent the string I put in the php-script. In brackets, I put values which are created when I create the alias through the ispconfig GUI: document_root (/var/www/clients/client1/web5) system_user (web5) system_group (client1) php_open_basedir (/var/www/clients/client1/web5/web:/var/www/clients/client1/web5/tmp:/var/www/bgesundes-krefeld.de/web:/srv/www/bgesundes-krefeld.de/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/php) Any thoughts on this? Can I ignore this matter?
Some values are only for the main website domain, not for alias domains (like document root or open basedir). Alias domains do not have a system_user either. You can have a look inside the interface/web/sites/form/web_aliasdomain.tform.php - only the fields listed there (and some basic fields like the server_id and sys_user etc) are used.
Hi Marius, thank you again. I was just wondering, as this fields are inside the alias_add-script and also filled by the web-GUI of ispconfig ... So, I will ignore this fact ;-)