This documentation explain how to install Drag & Drop Site Creator (DDSC) with mass virtual sub domains.
The default installation of DDSC creates sub folders like: http://www.yourdomain.com/vhosts/web_site_project_name/
With the mass virtual sub domain it will look like: http://web_site_project_name.yourdomain.com/
It improve the security, more for external and third party application where session cookies are set on the domain and not on the folders.
Login at http://www.dragdropsitecreator.com/ in your license manager setup the 2 ips and domain name your are going to use for the ddsitecreator.
Then click on the link Generate the license. You will receive the license key by email.
The linux version of DragDrop Sitecreator works with Apache. We describe the default apache setup, if you have a control panel you will need to customize a bit your setup.
We give explanations for populare control panels, CPanel/WHM, Plesk, DirectAdmin, Ensim.
wget http://www.dragdropsitecreator.com/release/dragdropsitecreator.tar.gz
tar -zxvf dragdropsitecreator.tar.gz
mv sitecreator/* /var/www/html/
assuming /var/www/html is your web server document root directory.
The vhosts directory need to be made writeable by the apache web server. if your apache web server run under group “apache” you can do the following:
chgrp apache vhosts/ chmod g+rw vhosts/
(to see which group your apache web server uses, look into the /etc/httpd/httpd.conf files for “Group” declaration.)
cd /var/www/html/ cd www/ ln -s ../admin/designs/ designs
If you cannot create links you will need to copy them:
cp -r admin/designs www/
mysqladmin create dragdropsitecreator
or
mysql -p
CREATE DATABASE dragdropsitecreator;
mysql -p
GRANT ALL PRIVILEGES ON dragdropsitecreator.* TO 'sitecreator'@'localhost' IDENTIFIED BY 'some_password'; FLUSH privileges; quit;
mysql -p dragdropsitecreator < dragdropsitecreator.sql
dbconnect.inc.php
Set the username and password to access the database:
$conx = new sqlConnect("<database username>", "<database password>") ; $conx->setHostname("localhost") ; // Database server, to change only if the database is on an other server $conx->setDatabase("dragdropsitecreator") ; // Database name, to change only if the database name if different.
To get it running you need a dedicated IP address and a subdomain with a wildcard pointing to it. In your DNS record it should look like that:
sitecreator.yourdomain.com. IN A 168.76.231.38 www.sitecreator.yourdomain.com. IN A 168.76.231.39 admin.sitecreator.yourdomain.com. IN A 168.76.231.39 *.sitecreator.yourdomain.com. IN CNAME sitecreator.yourdomain.com.
The 168.76.231.38 in the exemple need to be a dedicated IP no used by any other virtual host. the 168.76.231.39 can be shared with other virtual host as a standard web site.
Edit the file dragdropsitecreator_apache.conf Replace 168.76.231.38 and 168.76.231.39 with your ip addresses and yourdomain.com with your domain name.
Then copy the file in your apache/conf.d directory or insert or include the content of it in your httpd.conf file.
Include conf/dragdropsitecreator_apache.conf
You need to purchase a license key at http://www.dragdropsitecreator.com/ In the license key manager setup the license key information, ip1, ip2 and domain name and then click on the link Generate Key You will receive the key by email.
The license key is a php file with called
.ht_keyfile.inc.php
Place the key at the root of the sitecreator/, along with dbconnect and the admin, pas and www folders.
You may need to do a
ls -la
to view the license key.
The installation is done using ssh (shell, unix command line).
* Unzip or untar the archive files websiteuser is the name of the user associated with your domain. cd into the account /home/websiteuser/ directory and untar with the following command:
cd /home/websiteuser wget http://www.dragdropsitecreator.com/release/dragdropsitecreator.tar.gz tar -zxvf dragdropsitecreator.tar.gz chown websiteuser:nobody sitecreator/ -R
NOTE:Dont unzip the tar.gz inside your public_html or www directory. Do it directly from the /home/websiteuser
Upload the license you’ve received by email and put it in the sitecreator/ directory. (replace the test one).
cd /home/websiteuser/sitecreator/ ./cpanel_setup
NOTE: You may need to set cpanel_setup executable:
chmod u+x cpanel_setup
And follow the instructions for the Apache and DNS setup. You can also setup the DNS in your WHM using the _bind.conf file has an example. writable
mysqladmin create dragdropsitecreator
or
mysql
CREATE DATABASE dragdropsitecreator;
mysql
GRANT ALL PRIVILEGES ON dragdropsitecreator.* TO 'sitecreator'@'localhost' IDENTIFIED BY 'some_password'; FLUSH privileges; quit;
mysql dragdropsitecreator < dragdropsitecreator.sql
vi dbconnect.inc.php
Set the username and password to access the database:
$conx = new sqlConnect("<database username>", "<database password>") ; $conx->setHostname("localhost") ; // Database server, to change only if the database is on an other server $conx->setDatabase("dragdropsitecreator") ; // Database name, to change only if the database name if different.
if everything is working fine: http://admin.sitecreator.yourdomain.com/ log in with: admin/admin Create a user and then log in at: http://www.sitecreator.yourdomain.com/login.php
To run sitecreator you will need the Zend Optimizer to be installed. As root run:
/scripts/installzendopt
And follow the instructions. In general the default settings works.
The standard cPanel instructions includes apache/php directives in the apache configuration files. Which will not work in a phpsuexec environment. So you will neet to use the cpanel_phpsuexec_ddsc_apache.conf file and copy and customize the php.ini for each folders: admin, vhosts and www.
In the set of instructions bellow replace the “websiteuser” by the username of the user your curently installing dragdropsitecreator in. (ex: /home/websiteuser/ )
chown websiteuser:websiteuser * -R
find * -type f -exec chmod 0644 {} \;
find * -type d -exec chmod 0755 {} \;
sitecreator/admin/php.ini sitecreator/vhosts/php.ini sitecreator/www/php.ini
safe_mode = On register_globals = On auto_prepend_file = "pb_prepend.sys.php" auto_append_file = "pb_append.sys.php" open_basedir = "."
safe_mode = Off register_globals = On
cd sitecreator/pas/sitetemplate/ ln -s /home/websiteuser/sitecreator/vhosts/php.ini php.ini
rm sitecreator/admin/.htaccess rm sitecreator/www/.htaccess
cp cpanel_phpsuexec_ddsc_apache.conf cpanel_ddsitecreator_apache.conf ./cpanel_setup
If you get:
Premature end of script headers: /home/youruser/public_html/sitecreator/admin/install.php
This means the files is set with group and other writable permission where it should be only the user (youruser) that can write the script.
mod_security will block a some of the links in www and admin If you get the following error: “FileNotFound”, and “Forbidden” Errors:
Examples:
http://admin.sitecreator.yourdomain.com/reseller_manageusers.php then click the "FTP" link. http://www.sitecreator.yourdomain.com.com/dragdropsitecreator_intro.swf "Not Found"
This is a sign of pages blocked by mod_security. To turn mod_security off in admin and www add in their respective virtual domain:
<IfModule mod_security.c>
# Turn the filtering engine On or Off
SecFilterEngine Off
</ IfModule>
Once setup and running, setup your Admin account at: http://admin.sitecreator.yourdomain.com/ The default username and password is : admin/admin Update that password in Your Information Set your authorized server for FTP in the Preferences From the site integration section you will find html code to add registration forms and login links to your web site.