• The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

How to create an addon domain in plesk

S

sibinkc

Guest
Follow these steps to create an addon domain "addondomain.com" which points to "maindomain.com/addondomain"


1. Log into the Plesk control panel of maindomain.com

2. Create a Domain Alias for it as addondomain.com

3. Create a directory named "addondomain" on the httpdocs and or httpsdocs directories for "maindomain.com"

NOTE : Do not forget to give proper ownership if you are creating from back end as root user


4. Open the 'httpd.include' file for "maindomain.com"

5. Remove all the the ServerAlias entries for "addondomain.com" from this file

ServerAlias addondomain.com
ServerAlias www.addondomain.com


6. Create a new VirtualHost entry for "addondomain.com" as follows

<VirtualHost 10.0.0.3:80>
ServerName addondomain.com:80
ServerAlias www.addondomain.com
SuexecUserGroup zanaboli1372com psacln
ServerAdmin "[email protected]"
DocumentRoot /var/www/vhosts/maindomain.com/httpdocs/addondomain
ErrorLog /var/www/vhosts/maindomain.com/statistics/logs/error_log
ScriptAlias /cgi-bin/ /var/www/vhosts/maindomain.com/addondomain/cgi-bin/
</VirtualHost>

NOTE : Do not forget to change the DocumentRoot to '/var/www/vhosts/maindomain.com/httpdocs/addondomain'
NOTE : If you wish to use SSL for this domain create another VirtualHost entry as above with the port 443
instead of 80 (Also change httpdocs' to 'httpsdocs' in the DocumentRoot)


7. Save the file 'httpd.include'

8. Restart apache

service httpd restart

9. Place a test index.html page on '/var/www/vhosts/maindomain.com/httpdocs/addondomain'

10. Check "addondomain.com" by accessing through a browser

11. :)
 
You realize that Plesk will overwrite httpd.include files, so you shouldn't edit them (as stated in the comments at the beginning of every httpd.include file)?

I believe it would be much easier to create addondomain.com and use mod_rewrite to rewrite all requests to maindomain/addondomain (use .htaccess or vhost.conf).
 
It is not advisable to use the above mentioned steps (my own post) to create an addon for Plesk domains. Those steps will work fine, but it requires to change the permission of 'httpd.include' file to '-rw-r--r--', if not plesk will automatically recreates this file with the old contents while performing the periodical update. But this will affect the further domain processing while creating another sub domain, domain alias...etc by the customer through his Plesk.


The advisable method to create an addon domain in plesk is as follows.



1. Create a subdomain for the addon domain (if it is not already created)
Say it is http://subdomain.maindomain.com

2. Create another domain hosting from the Plesk after logged into the plesk as admin

3 . On the next step select 'Standard forwarding', instead of using 'Physical hosting'

4 . Type 'Destination URL:' as 'http://subdomain.maindomain.com'

5 . Click on the 'OK' button to save the settings

6 . :)
 
Back
Top