Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 02-25-2008, 04:00 AM
Hadoken's Avatar
Hadoken Hadoken is offline
Baby Croc
 
Join Date: Feb 2006
Posts: 56
Default subdomain of addon domain in addon directory, is it possible ?

Hello,
I would like to know if it is possible to create a subdomain of addon directory in addon directory ?
Here is an exemple of my directory :

Code:
public_html              (www.primarydomain.com)
    addondom             (www.addondom.com)
I would like to create img.addondom.com, but each time I try to create this subdomain, 'img' directory is created under public_html and not under addondom , like that :

Code:
public_html             (www.primarydomain.com)
    img                 (img.addondom.com)
    addondom            (www.addondom.com)
What I want, it's 'img' subdomain directory is created under addondom directory like that :

Code:
public_html                  (www.primarydomain.com)
    addondom                 (www.addondom.com)
        img                  (img.addondom.com)
How can I do that ?
Thank you very much

Have a great day.

++
Hadoken
Reply With Quote
  #2  
Old 02-25-2008, 04:30 AM
whatrevolution's Avatar
whatrevolution whatrevolution is offline
Royal Croc
 
Join Date: Feb 2008
Posts: 710
Default Re: subdomain of addon domain in addon directory, is it possible ?

Quote:
Originally Posted by Hadoken View Post
How can I do that ?

Can't.

The subdomain configuration in cPanel is posting the data you enter in that form to a CGI script, which does the work of writing and deleting lines in httpd.conf, BIND named.conf, and resets the BIND daemon.

The fact that the subdomain's directory is ~/public_html/subdomain/ is something which is written into those CGI and shell scripts, and as such, is not something HostGator techs are likely to change for you. That would damage the consistency of their system, possibly break other scripted procedures, and you can guarantee it would confuse most Support Techs who happened across it, later... if they noticed at all.
Reply With Quote
  #3  
Old 02-25-2008, 06:19 PM
slapshotw's Avatar
slapshotw slapshotw is offline
Veteran Croc
 
Join Date: Jun 2006
Posts: 5,164
Default Re: subdomain of addon domain in addon directory, is it possible ?

Whatrevolution isn't correct on this one. You can easily do a subdomain on an addon domain with cPanel. Just make your addon domain, then go to "subdomains." You'll have the addon domain in the dropdown box and can choose the folder structure you want.
__________________
Follow me on Twitter! http://twitter.com/mrw
Reply With Quote
  #4  
Old 02-26-2008, 03:44 AM
Hadoken's Avatar
Hadoken Hadoken is offline
Baby Croc
 
Join Date: Feb 2006
Posts: 56
Default Re: subdomain of addon domain in addon directory, is it possible ?

Hello,
Thank for your answer everyone.

slapshotw : I tried different things but I still have the problem. The directory of the subdomain is always created under the primary domain.
Here is what I did :
subdomain.addondomain.com : subdomain was created under primary domain.

subdomain.addondomain.primarydomain.com : subdomain was created under primary domain again.

What can I do ? Can you try it on your own ? Thank you .


whatrevolution : thank you very much for these precision. I think I will link to the directory of the primary domain. But it's not very good about my script that are stored in addon domain, the php $_SERVER_ROOT thing will not be the same on addon and subdomain. I hope slapshotw will find a solution.

Have a great day,

++
Hadoken
Reply With Quote
  #5  
Old 02-26-2008, 10:48 AM
Goddess Dix's Avatar
Goddess Dix Goddess Dix is offline
King Croc
 
Join Date: Aug 2006
Location: KS, USA
Posts: 1,498
Default Re: subdomain of addon domain in addon directory, is it possible ?

Quote:
Originally Posted by Hadoken View Post

subdomain.addondomain.primarydomain.com : subdomain was created under primary domain again.

What can I do ? Can you try it on your own ? Thank you .
have you actually tried to access it without the primary domain? your control panel shows it that way (and it's accessible that way) for addons, but it's probably also accessible without the primariy domain. i've never added a subd. to an addon, but with any addons, it always lists them like subs in the control panel anyway.
Reply With Quote
  #6  
Old 02-26-2008, 12:26 PM
Hadoken's Avatar
Hadoken Hadoken is offline
Baby Croc
 
Join Date: Feb 2006
Posts: 56
Default Re: subdomain of addon domain in addon directory, is it possible ?

Hello Goddess Dix,

Yes I tried to access them, there is no problem on this side.
The main problem is that the directory is not created on the right path. It's always created under the public_html directory like that :

public_html/subdomain

What I want is that the subdomain should be created under addon domain directory like that :

public_html/addon/subdomain

Thank you.
Best regards

++
Hadoken
Reply With Quote
  #7  
Old 02-26-2008, 05:09 PM
eLIANT eLIANT is offline
King Croc
 
Join Date: Apr 2005
Posts: 1,075
Default Re: subdomain of addon domain in addon directory, is it possible ?

Quote:
Originally Posted by Hadoken View Post
What I want is that the subdomain should be created under addon domain directory like that :

public_html/addon/subdomain
Why?

If you want visitors to access http://sub.addon.com (which is how subdomains are supposed to be accessed) then do as Slapshot instructed. It's not necessary for the subdomain's directory to be located below the the directory of the addon. DNS takes care of serving the pages to the browser when the visitor requests the URL using the format above.

If you want visitors to access http://addon.com/sub then what you want is simply a directory under addon (which is not a true subdomain) and all you need to do is create it using filemanager.
__________________

eLIANT Technology Services
(site feedback welcome)
Reply With Quote
  #8  
Old 02-27-2008, 10:09 AM
whatrevolution's Avatar
whatrevolution whatrevolution is offline
Royal Croc
 
Join Date: Feb 2008
Posts: 710
Default Re: subdomain of addon domain in addon directory, is it possible ?

This is a matter of file organization, not domain accessibility.

Godess Dix, slapshotw, and eLIANT are correct in their own right that there are ways to mostly accomplish what Hadoken was asking about. Hadoken's specific request, so far as I have seen, is still not available for the reasons I described.

1) You can have sub-directories of an addon domain, which aren't sub-domains of it.

2) Or you can have sub-domains of the addon domain, which aren't sub-directories of it.

It may not be NECESSARY to have both together, but it's annoying that we can't, and it could be confusing to many.
Reply With Quote
  #9  
Old 03-15-2008, 04:54 PM
penguin's Avatar
penguin penguin is offline
Hatchling Croc
 
Join Date: Mar 2008
Location: Bruges, Belgium
Posts: 9
Default Re: subdomain of addon domain in addon directory, is it possible ?

any result on this yet?

Would like to have a subdomain too in a directory that is not located under the public_html directory

I know this is possible with the x3 theme of cpanel, but the x theme doesn't seem to like that...

ps pretty new around here (look at my postcount )
So I hope this isn't regarded as digging up an "old" thread )
Reply With Quote
  #10  
Old 03-15-2008, 06:03 PM
episkey episkey is offline
Junior Croc
 
Join Date: Feb 2008
Posts: 133
Default Re: subdomain of addon domain in addon directory, is it possible ?

Suppose I have addon1.com and addon2.com. Now I want to create the subdomains members.addon1.com and members.addon1.com. What happens?
Reply With Quote
  #11  
Old 03-15-2008, 08:31 PM
RainbowViper's Avatar
RainbowViper RainbowViper is offline
King Croc
 
Join Date: Mar 2008
Location: St Paul MN
Posts: 814
Default Re: subdomain of addon domain in addon directory, is it possible ?

I assume that's a typo, and you want members.addon2.com, not two copies of members.addon1.com....


Assuming that's true, and if addon1.com and addon2.com have been added in the Addon Domains page and are "live", you go to the Subdomain Creation page, where (now) addon1.com and addon2.com will available choices in the drop-box for base domain selection. Create them both as you wish.

I have 6 domains. 1 Main, 4 Parked and 1 Addon, plus two subdomains of Main. One of them is in the form sub.addon.com and it works fine.

There *IS* a small gotcha I found out today, just for everyone's FYI.

I wanted sub.main.com and addon.com to go to the same directory, and set it that way.

IT WORKS FINE, but then you can't differentiate traffic by either domain when using Awstats, Visitors Today, etc.

The logs list the *total* access from that directory by both of them, and make no distinction between addon.com's and sub.main.com's individual use, which is annoying but not too much.

Hope that's what you were asking.
Reply With Quote
  #12  
Old 03-15-2008, 09:14 PM
slapshotw's Avatar
slapshotw slapshotw is offline
Veteran Croc
 
Join Date: Jun 2006
Posts: 5,164
Default Re: subdomain of addon domain in addon directory, is it possible ?

Quote:
Originally Posted by penguin View Post
Would like to have a subdomain too in a directory that is not located under the public_html directory
Have you asked HG to change you to x3?
__________________
Follow me on Twitter! http://twitter.com/mrw
Reply With Quote
  #13  
Old 03-16-2008, 03:49 AM
penguin's Avatar
penguin penguin is offline
Hatchling Croc
 
Join Date: Mar 2008
Location: Bruges, Belgium
Posts: 9
Default Re: subdomain of addon domain in addon directory, is it possible ?

Quote:
Originally Posted by slapshotw View Post
Have you asked HG to change you to x3?
didn't realize HG would(could) allow that (former provider didn't). Shall do it immediately
__________________
Slowly taking over the world with penguins.
Fase 1 initiated: codename GlobalWarming
Reply With Quote
  #14  
Old 03-16-2008, 05:51 AM
whatrevolution's Avatar
whatrevolution whatrevolution is offline
Royal Croc
 
Join Date: Feb 2008
Posts: 710
Default Re: subdomain of addon domain in addon directory, is it possible ?

Quote:
Originally Posted by slapshotw View Post
Have you asked HG to change you to x3?
Quote:
Originally Posted by penguin View Post
didn't realize HG would(could) allow that (former provider didn't). Shall do it immediately
You can set a "document root" for each subdomain, but only when you create it, it seems. Existing ones have to be deleted and remade. The document root folder must be within /public_html/, still. Otherwise, it will be forbidden for the webserver to view the file.

RewriteRule in .htaccess is needed to enforce primary domain.tld/folder referral to subdomaintofolder.domain.tld
Reply With Quote
  #15  
Old 03-16-2008, 06:24 AM
penguin's Avatar
penguin penguin is offline
Hatchling Croc
 
Join Date: Mar 2008
Location: Bruges, Belgium
Posts: 9
Default Re: subdomain of addon domain in addon directory, is it possible ?

well, not sure if you're refeering to x or x3,
but with x3 you can choose any folder you want (outside public_html too).
Even if it doesn't exist it will be created an proper rights will be given automatically

small note: HG switched my theme allready. I feel I'm going to like HG
__________________
Slowly taking over the world with penguins.
Fase 1 initiated: codename GlobalWarming
Reply With Quote
  #16  
Old 03-16-2008, 06:34 AM
Jordanlw's Avatar
Jordanlw Jordanlw is offline
Royal Croc
 
Join Date: Dec 2007
Location: Australia
Posts: 425
Default Re: subdomain of addon domain in addon directory, is it possible ?

Quote:
Originally Posted by penguin View Post
well, not sure if you're refeering to x or x3,
but with x3 you can choose any folder you want (outside public_html too).
Even if it doesn't exist it will be created an proper rights will be given automatically

small note: HG switched my theme allready. I feel I'm going to like HG
Offtopic: Welcome To HG!
__________________
http://free-vent.com Providing FREE PUBLIC Ventrilo (VOIP) use.
Reply With Quote
  #17  
Old 03-16-2008, 06:39 AM
penguin's Avatar
penguin penguin is offline
Hatchling Croc
 
Join Date: Mar 2008
Location: Bruges, Belgium
Posts: 9
Default Re: subdomain of addon domain in addon directory, is it possible ?

Offtopic: thx

Ontopic: please continue
__________________
Slowly taking over the world with penguins.
Fase 1 initiated: codename GlobalWarming
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 10:03 AM.