{"id":79,"date":"2010-02-01T14:55:26","date_gmt":"2010-02-01T13:55:26","guid":{"rendered":"http:\/\/toderu.ro\/blog\/?p=79"},"modified":"2010-02-01T14:55:26","modified_gmt":"2010-02-01T13:55:26","slug":"create-a-subdomain-z-wildcard-in-plesk","status":"publish","type":"post","link":"https:\/\/kb.toderu.ro\/?p=79","title":{"rendered":"Create a subdomain z-WILDCARD in Plesk"},"content":{"rendered":"<p>\t\t\t\t  1.  Create a subdomain z-WILDCARD in Plesk &#8211; of course in the admin section of the right domain.<br \/>\n      Why do we need this name? &#8217;cause this entry should be the last entry in the list of subdomains, otherwise this<br \/>\n&#8220;trick&#8221; will not work. So if you have a domain as e.g. zabalula , than you should maybe name the subdomain zzzz-WILDCARD<br \/>\nor similar.<br \/>\n   2. Add special configuration (catchall for all subdomains) to the <code>vhosts.conf<\/code> file of this subdomain.<br \/>\n      Normally it&#8217;s located in <code>\/srv\/www\/vhosts\/domain.com\/subdomains\/z-WILDCARD\/conf\/vhosts.conf<\/code>. You have to create it<br \/>\n&#8211; normally you need the root user to do this. Copy the following content into the file:<br \/>\n      <code>ServerAlias *.domain.com<\/code><br \/>\n   3. Apply the new configuration &#8211; recreate the Apache configuration. You have to run the tool websrvmng which is a<br \/>\nPlesk tool that manages and creates the webserver configuration. Execute the following as root user.<br \/>\n      <code>\/usr\/local\/psa\/admin\/sbin\/websrvmng -u --vhost-name=domain.com<\/code><br \/>\n   4. Finally &#8211; restart Apache to load the new configuration, also as root.<br \/>\n      <code>apache2ctl restart<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Create a subdomain z-WILDCARD in Plesk &#8211; of course in the admin section of the right domain. Why do we need this name? &#8217;cause this entry should be the last entry in the list of subdomains, otherwise this &#8220;trick&#8221; will not work. So if you have a domain as e.g. zabalula , than you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3,11,14],"tags":[],"class_list":["post-79","post","type-post","status-publish","format-standard","hentry","category-apache","category-dns","category-plesk","category-virtualhost"],"_links":{"self":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts\/79","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=79"}],"version-history":[{"count":0,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=\/wp\/v2\/posts\/79\/revisions"}],"wp:attachment":[{"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.toderu.ro\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}