HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Guidance needed for setting up a subdomain, please (http://www.howtoforge.com/forums/showthread.php?t=36651)

manarak 17th June 2009 16:14

Guidance needed for setting up a subdomain, please
 
Hi, I searched the forum, but I found nothing that was very clear on how to achieve the following:

I have a site domain.com

I have a /subdomain directory inside /web, like this: /web/subdomain

I want subdomain.domain.com to point to /web/subdomain, /web/subdomain being new root dir for the site on the subdomain.

I want to access all files with the same FTP user.


Thanks!

P.S. I tried to setup a subdomain by just setting up a site for it and then added a DNS zone with the wizard if it were a different site, but it doesn't seem to work:
While the subdomain works correctly, the content of the subdomain is shown on the main domain instead of the main domain's content.

Croydon 17th June 2009 16:16

Just use the redirect function and set the redirect path to /subdomain/ and the type to L.

manarak 17th June 2009 16:18

hmm... the path would be the server path, like /var/www/... etc?

manarak 17th June 2009 16:32

and what should I do with the DNS zone?

I would like to know exactly what to do.

Croydon 17th June 2009 16:35

No, not the server path. Just the path inside the web.
DNS Zone? Same as the main zone for this website.

manarak 17th June 2009 16:36

so, I don't need to create a DNS Zone for the subdomain, right?

So the process would be:

1- create a site standard normally, domain.com
2- inside that site, create a /subdomain/ subfolder
3- create a new site on ISPC, with domain subdomain.domain.com
4- setup an "L" redirect to folder /subdomain/ (typed like that exactly)

is that correct?

manarak 17th June 2009 16:49

and there is no DNS record of type A required for a subdomain?

Croydon 17th June 2009 18:11

Quote:

Originally Posted by manarak (Post 194859)
so, I don't need to create a DNS Zone for the subdomain, right?

So the process would be:

1- create a site standard normally, domain.com
2- inside that site, create a /subdomain/ subfolder
3- create a new site on ISPC, with domain subdomain.domain.com
4- setup an "L" redirect to folder /subdomain/ (typed like that exactly)

is that correct?

That sould do it, yes.

Quote:

Originally Posted by manarak (Post 194863)
and there is no DNS record of type A required for a subdomain?

Depends on your setup.
The subdomain must lead to you server's ip address so either you have to create a dns A record or you have a dns A record for *

manarak 17th June 2009 18:50

in the normal case of a shared server, there would be no A entry for *, right?

so there is step number 5, which is to create an A entry in the domain's DNS zone, in the same manner as for www and mail.


Thank you for your help.
I think I got it covered now!


Final procedure for anybody searching in future the same thing on the forum :

1- create a site standard normally, domain.com
2- inside that site, create a /subdomain/ subfolder
3- create a new site on ISPC, with domain subdomain.domain.com
4- setup an "L" redirect to folder /subdomain/ (typed like that exactly)
5- create an A-type record associating subdomain to the IP in the DNS Zone of domain, in the same manner as mail or www.

manarak 17th June 2009 18:56

ok, I just tried the above setup, and it does *NOT* work...


All times are GMT +2. The time now is 07:02.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.