• 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.

Subdomains in same dir, vhost, and SetEnv

R

RenaudL

Guest
Hi everybody,

I'm new to Plesk, and despite hours or even days of research, I did not find how to accomplish this simple thing I can do with "standard" hostings :
- Create a new subdomain thanks to a vhost in sites-enabled and sites-available
- That subdomain uses the same application folder as the main domain
- The vhost allows me to define subdomain-specific SetEnv directives

For example :
I want fr.mydomain.com to use the same files as www.mydomain.com do, but I want to define a SetEnv directive defining the language to use for displaying the website.

(I have a 1&1 hosting)
According to what I found online, I tried to create a vhost.conf in my main domain conf folder, without creating a subdomain in Plesk (though it is created in 1&1 interface). The problem is, my subdomain seems to be "located" in the "default" directory (in /var/www/vhosts/default/). (ok a solution would be to make my main domain linked to that default dir, but I don't like that idea)
Then I tried to create a subdomain in Plesk and define the same directory as my main domain in the creation form (to force Plesk to use the same dir), but it still created a new folder in /var/www/vhosts/ and hitting the URL got me the default 1&1 "new website" landing page.

I am really unsure on how to do that simple task...

Any help will be greatly appreciated !

(waiting for a reply, I tried to CNAME my subdomain in the 1&1 interface to my main domain -- worth a try -- but I of course have to wait for DNS propagation)

Thank you all !

EDIT : of course before posting I also read the plesk documentation : http://download1.parallels.com/Ples...nistration-guide/index.htm?fileName=68625.htm , but it only deals about some weird vhost templates I did not grab a thing about, maybe due to my bad english or else
 
Last edited by a moderator:
Hi,

It sounds like you want a domain alias.

- Goto the domain in the control panel
- Choose the "Webhosting and Domains" tab
- Click the Add new Domain Alias button at the bottom above the list of domains.

Enter the subdomain, and choose the domain you want to make it an alias of.

That should do it.
 
Back
Top