Web Hosting Talk







View Full Version : Plesk - Setting subdomains


vera
03-30-2001, 11:52 PM
Hi,

I want http://subdomain.mydomain.com to be redirected to http://www.mydomain.com/subdomain
How to do that using Plesk? I have tried it using DNS, CNAME, but it only worked for http://subdomain.mydomain.com redirected to http://www.otherdomain.com
Thanks.

Vera.

Chicken
03-31-2001, 12:31 AM
Is it like RaQ's where the httpd.conf is overwritten by the 'control' panel? You can't do that via traditional DNS zone settings, it is a path, but you may be able to do that by changing the doc root. This doesn't work so well on the RaQ due to it having a mind of its own. It may be similar with Plesk.

Racin' Rob
03-31-2001, 10:51 AM
In Plesk admin for setting up the web hosting for the subdomain, use "standard forward" redirect method instead of physical hosting. Have it redirect to the URL you want.

vera
04-02-2001, 03:36 AM
are there any other way to do that besides using Plesk? if i want to do it manually, which file should i edit? and how?
thank you.

GordonH
04-02-2001, 06:13 AM
Hello
First you need to edit the DNS for the domain.

Say the subdomain is host1.mydomain.com
You would set up host1 in A 127.0.0.1 (use the IP address of your server here)

Then you need to go to httpd.conf and set up a NameVirtualHost entry for host1.mydomain.com
You should be able to copy an existing one and modify it to save on the typing.
Make sure it is the right IP address.
Make the path to the documents correct like
/home/public_html/host1/ this will draw the contents of the subdomain from http://www.mydomain.com/host1/

Its not something you should undertake lightly.
You must
OK, I am going to say this again:
**you must**
Back up httpdf.conf before you start mucking around with it or you could end up in serious trouble.

Also, the examples above are based on my server configuration, your directories may be called something different.

Before we switched to Cpanel3 I used to give customers a free php script which redirected their subdomains to directories without having to do any changes on the server.
This might be a simpler solution for you,.

Gordon

Racin' Rob
04-02-2001, 08:36 AM
Originally posted by vera
are there any other way to do that besides using Plesk? if i want to do it manually, which file should i edit? and how?
thank you.

It is easy to do it manually, but if your server has plesk installed, it would overwrite your manual changes everytime you make a change using plesk to any of your installed domains. So that would be defeating the purpose.

Butyou would need DNS records for the subdoamin entered in your DNS servers. You would also need a section similiar to the one below in your http.conf file.

<VirtualHost 200.201.202.203:80>
ServerName subdomain.domain.com
RedirectPermanent / "http://www.domain.com/directory/"
</VirtualHost>


But like I said above, if you have Plesk installed, these manual changes will be over written each time there is a change made from within Plesk.

amitabhmca
02-07-2004, 07:29 AM
sir
please give the detail about subdomain

amitabh