Plesk Domain Management
Create domain in Plesk 9
In some old versions you may need to go to:
- Main Menu - Clients
- Click the client under Client's name
- Under "Domains view | create | stats" click create
Frame Forwarding in Plesk 10
This is used when you want to go to a website address, such as bbc.co.uk, but to load the content from another website/URL such as bbc.co.uk/news , but keep the original website address (bbc.co.uk).
This can be done via Plesk by going the Websites & Domains for the Webspace/Subscription, then click Add New Domain.
Enter the domain you want the content to show for.
Then select the Forwarding option, then select the Frame forwarding, click OK.
Domain suspended by hosting provider
Linux:
/usr/local/psa/bin/domain -u domain.com -status enabled
Windows:
cd %plesk_bin% domainmng.exe --turn-on --domain-name=DOMAIN.CO.UK
or
cd %plesk_cli% domain --webspace-on <subscription-name>
For domain aliases use:
cd %plesk_bin% domalias.exe -u DOMAINALIAS.CO.UK enabled
cd %plesk_dir%MySQL\bin mysql.exe -uadmin -p -P 8306 use psa update domainaliases set status=0 where status=2;
or
update domain_aliases set status=0 where status !=0;
If you get domain expired when trying to unsuspend then you need to either:
- Within Plesk 10 go to Statistics > Resource Usage > Expiration Date and set to Never Expire.
- Within Plesk 9 go to Domains > Tick the domain > Modify (at the top) > under Limits set the Expiration date from Do Not Change to unlimited, then scroll to the bottom and click OK
Also notable is that if within Domains -> Backup Manager -> Back Up the option "Suspend domain until backup task is completed" is ticked and the backup fails it will not unsuspend it. This is caused because the domain was set to suspend until the backup completed. As it failed, then was unsuspended, then completed (but suspended during the backup and did not come back up) the same command needed to be issued and the suspend domain during backup option disabled.
A fix is to run a backup again with the option ticked, and it should unsuspend it if the backup successfully completes.
Domain or IP shows different website
The places to check if this happens in Plesk are:
- Hosting Services - Domains > Control Panel for the domain > Websites and Domains tab > Web Hosting Settings > The IP that the domain is set to
- Tools & Utilities/Tools & Settings > IP Addresses > Default domain
Ensure you have the IP set to Shared if you are using the IP for multiple websites, or Dedicated for a single domain or one using SSL.
This is because the site you want uses a Dedicated IP address or is set to use a different Default Site. Within Plesk in Server Management > Tools & Settings > Tools & Resources > IP addresses > click the IP address that the site is on.
You likely have the IP address set to be:
Dedicated
Default Site: domainyoudon'twant.co.uk
Therefore the site you want will show domainyoudon'twant.co.uk's content. To fix this set the IP address to:
Shared
Default Site: None
Default Domain
This defined either within Server tab > Tools & Resources > IP Addresses or Server Management > Tools & Settings > Tools & Resources > IP Addresses
If the Default site is set to None, it will pick up the page from /var/www/vhosts/default/htdocs . Set the IP to Shared for multiple websites. Dedicated for one site, especially for an SSL.
If you have the default domain as none and a domain does not have the following DNS record:
- www
- A record or CNAME
- IP or non-www domain
it picks up the default index.html within /var/www/vhosts/default/htdocs/ . Add a www Alias in Plesk for the domains or the above DNS record.
Domain Forwarding
Actually make each domain in Plesk as a Domain by logging into Plesk and going to:
- Hosting Services - Domains/Subscriptions
- Open in Control Panel/Manage Hosting/Control Panel
- Websites & Domains tab
- Add New Domain
- Select Forwarding in the Hosting Type section
- in Forwarding Settings > Destination address put the domain you want it to go to
You need to remove any aliases you have created before doing this. Bear in mind creating these forwarders will contribute to your the amount of domains left in the Plesk license.
Alternatively you can register each domain with a domain registrar (such as 123-reg) and do a 301 redirect. This is more secure technically as it means someone can't steal your domain aliases and point them with DNS which would be more authoritative than your Plesk settings.
If you want to assign a domain that is being forwarded to a customer, create a holding/fake subscription/domain name and then Add New Domain underneath it. Then you can assign the Subscription to a Customer in Plesk.
DNS Zone File
Linux:
/var/named/chroot/var/domain.co.uk /var/named/run-root/var/domain.co.uk
Windows:
TBA
Edit DNS Zone Template
- Server tab or Server Management > Tools & Settings
- General Settings > DNS Template Settings
Reconfigure Commands
This can be used to fix the issue where a website is pointing to a different webspace/domain after changing the default domain on an IP address to the site that is being redirected.
/usr/local/psa/admin/bin/httpdmng --reconfigure-all /usr/local/psa/admin/bin/websrvmng --reconfigure-all cd %plesk_bin% websrvmng.exe DNSMng.exe UPDATE domain.co.uk websrvmng.exe --reconfigure-all
Or it is used when you add:
Host: www Record Type: CNAME Destination/Target/Value: non-www domain #or Host: www Record Type: A Destination/Target/Value: IP Address
The httpdmng or websrvmng command may take a while to run, depending on the amount of domains of within Plesk.
Mail Manager is /usr/local/psa/admin/bin/mailmng
If the domain is still loading content from /var/www/vhosts/default/htdocs instead of var/www/vhosts/domain.co.uk/httpdocs, dig @nameserver domain A and ensure that the IP in Plesk's internal DNS is the same as the dig result.
Catchall email account in Plesk
Forwarding mail from non existent mail users
Wildcard subdomain
Emails on Domain Alias
Plesk 9 Guide
Parallels forum thread 1
Parallels forum thread 2
Other
Can't remove application after deleting httpdocs
Force default domain on IP for Plesk 8 to a different domain
This is sometimes needed when you want to assign SSL's but need to change the default domain in System - Server > System - IP Addresses.
mysql -uadmin -p`cat /etc/psa/.psa.shadow`; use psa show tables; select * from domains; #note down the first column ID quit mysql -uadmin -p`cat /etc/psa/.psa.shadow` -nBe 'update IP_Addresses set default_domain_id=X where ip_address="ServerIpAddress"' psa /usr/local/psa/admin/sbin/websrvmng -a -v
Then to assign the SSL do:
cd /opt/psa/bin certificate --assign-cert "CertificateName" -domain yourdomain.com -ip ServerIPAddress
Removing domain error on Plesk 9
Trying to remove a domain throws error seen here: http://forum.parallels.com/showthread.php?t=94795
Internal Plesk error occurred: Unable to remove hosting: SiteAppManager: Unexpected error: boost::filesystem::create_directory:
Trying to remove the domain via SSH domain using --remove returns:
ERROR: PleskFatalException Unable to remove hosting: SiteAppManager: Unexpected error: boost::filesystem::create_directory: 0: class.PhDomain.php:278 PhDomain->reset(integer '0', boolean true, boolean false) 1: class.BsDomain.php:330 BsDomain->reset(integer '0') 2: class.BsDomain.php:302 BsDomain->delete() 3: cuDomain.php:1753 cuDomain->cmdRemove(string 'connellbrothers.co.uk') 4: cuDomain.php:718 cuDomain->cuDomain() 5: domain.php:17 PHP Warning: Releasing semaphore 20 in request cleanup in Unknown on line 0
tail -f /var/log/sw-cp-server/error_log 2012-07-03 11:21:32: (mod_fastcgi.c.2582) FastCGI-stderr: PHP Warning: Releasing semaphore 20 in request cleanup in Unknown on line 0
If you get the below error you should just be able to do /opt/psa/bin/domain -r domain.co.uk:
Internal Plesk error occurred: Unable to get hardquota state: usermng: Unable to unlink directory entry index.php: Permission denied System error 13: Permission denied
Unable to update hosting preferences: hosting update is failed: object ID is invalid SysUser->systemRemove() failed: usermng failed: usermng: Unable to unlink directory entry index.php: Permission denied
System error 13: Permission denied
Connection to the database server has failed: Table 'mysql.servers' doesn't exist
To resolve this go into the server and do:
mysql -uadmin -p`cat /etc/psa/.psa.shadow`; mysql> use mysql
CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL, `Host` char(64) NOT NULL, `Db` char(64) NOT NULL, `Username` char(64) NOT NULL, `Password` char(64) NOT NULL, `Port` int(4) DEFAULT NULL, `Socket` char(64) DEFAULT NULL, `Wrapper` char(64) NOT NULL, `Owner` char(64) NOT NULL, PRIMARY KEY (`Server_name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
Query OK, 0 rows affected (0.00 sec)
Unable to delete hosting
The following rare error occurs in Plesk CP during a domain deletion/creation:
"Error: Unable to delete hosting: Unable to delete system user: SysUser->systemRemove() failed: usermng failed: usermng: Unable to set quota for user 'idcontroller': success"
The problem is that quota support may not be enabled or 'quotaugidlimit' limit is reached on the VPS where Plesk is installed. Login to the hardware node and enable second level quota support (or increase quotaugidlimit ) for the VPS with:
vzctl set VE_ID --quotaugidlimit N --save vzctl restart VE_ID
Where 'VE_ID' should be replaced with the real VE ID, and 'N' is a limit of users and groups inside the VE. Current 'quotaugidlimit' usage value can be found with the following command:
cat /etc/shadow /etc/group | wc -l
Also relevant: http://kb.parallels.com/en/1144 and http://forum.parallels.com/showthread.php?t=112437
Preview websites before DNS changes
Ensure before doing this the IP address in Server Management - Tools & Settings > Tools & Resources - IP Addresses is set to Shared.
Step 1) Go to Domains > Manage Hosting for a domain > Websites & Domains tab > Web Hosting Access
Step 2) From the IP address box select the IP address drop down menu and select a secondary shared IP
You will want to do this for all domains initially before the move of DNS. This will save you having to run from Step 1 to Step 4 for each domain.
Step 3) Then go to Server Management - Tools & Settings > Tools & Resources - IP Addresses > click the secondary shared IP
Step 4) Set it to Dedicated and select the Default site from the drop down menu to the one you want to test.
Step 5) Go to the IP address in your browser.
Step 6) Repeat Steps 4 and 5
PleskDBException
Hosting Services > Domains > Manage Hosting
Internal error: Unable to find service node for web service on domain with id=7 Message Unable to find service node for web service on domain with id=7 File PhDomainBase.php Line 775 Type PleskDBException
http://kb.parallels.com/en/113826
Website downloading page
Log into Plesk and go to:
- Hosting Services > Domains
- Open in Control Panel for your domain.
- Websites & Domains tab
- Click the domain at the bottom of the page
- Tick PHP Support (Fast CGI application from the drop down)
- Tick CGI Support