Jump to content

[HH#493773] Main domain change root


HelioHost
 Share

Recommended Posts

Username: ballagyr, Server: Tommy, Main domain: cybercity.eu.org

 

Hi, I am the user (ballagyr) of the domain (cybercity.eu.org) and I

would like to know if you can change the root directory of this domain.

 

I would like to organize it like this:

 

/home/ballagyr/public_html/cybercity.eu.org

/home/ballagyr/public_html/subdomain.cybercity.eu.org

 

e etc.

 

So that I could isolate the files and directory of the main site, from

the files of the subdomain sites.

 

If that is possible, I appreciate the change. Thanks!

Link to comment
Share on other sites

You would have to add your domain (cybercity.eu.org) as an addon domain, this way it would have its own directory (cybercity.eu.org) inside your public_html.

To do that, if you already have this domain as your main domain first you would need to change your main domain to another one (like a heliohost.org subdomain or other domain) and just then add it as an addon domain in your cPanel.

 

About subdomains it's pretty easy: when creating a subdomain cPanel has the option "Document Root", where it adds by default the subdomain name as the directory name inside your public_html. For example: when adding the subdomain "test" it would point its document root to "/public_html/test", so what you need to do is just change its document root to whatever the name you want the directory to have, like "/public_html/test.cybercity.eu.org".

Link to comment
Share on other sites

You would have to add your domain (cybercity.eu.org) as an addon domain, this way it would have its own directory (cybercity.eu.org) inside your public_html.

To do that, if you already have this domain as your main domain first you would need to change your main domain to another one (like a heliohost.org subdomain or other domain) and just then add it as an addon domain in your cPanel.

Assuming I add another domain as the primary one and then I will add (cybercity) as an additional domain. So, I would put it back as a primary domain, but keeping the root directory configuration as explained above?

 

With the subdomain, I know how it works, but I wouldn't want to see them mixed with the files on the main site. I want to isolate them!

Link to comment
Share on other sites

Actually no. You would have to keep it as an addon domain.

It is not possible to change the main domain directory from "public_html" to anything else. It's a cPanel limitation.

 

Just addon domains can have separate directories as you want.

Link to comment
Share on other sites

We don't support this configuration.

 

The way this is normally done is to set all of their domains as addon domains, pick a something.heliohost.org for their main domain, then put an .htaccess in the public_html folder. This keeps sites from seeing each other's files, and allows you to put "non-public" stuff in public_html alongside the addon domain docroots, with access blocked by the .htaccess file.

 

As was stated above, in order for a domain to use a docroot that's not public_html, it must be listed as an addon domain. To list the domain as an addon domain, you will need to change your main domain to something else before adding it.

Link to comment
Share on other sites

Yes, it is. By default cPanel doesn't let you change the main domain directory.

 

Someone asked the same as you and wolstech (a root admin) answered the same in here:

https://www.helionet.org/index/topic/38867-unable-to-host-my-domain-on-heliohost/

 

Also, I'm pretty sure a root admin (wolstech or Krydos, not sure which one of them) already posted that it wasn't possible because even if they did change the main folder, due to how cPanel works, when Apache restarts it would be reseted to public_html, but I'm not able to find that post right now.

 

PS.: Olá =)

 

Edit: Yay, wolstech came before I finished my post :P

Edited by fasouza
Link to comment
Share on other sites

@fasouza: Bingo. It's not so much when Apache restarts as it is when httpd.conf gets rebuilt, but same idea since it rebuilds as prior to restarting around here anyway.

 

It's not that we don't want to, it's just how cPanel works. There are modifications/extensions available that supposedly can do it, but we don't use any of them because all they do is add complexity and risk of failure to a system that is already pushed well beyond it's design capabilities (cPanel is made to handle about 400 users per server, we have several thousand...we're actually known to cPanel's support as one of their most extreme use cases). Doing more with less is an art we take pride in, and unfortunately that means sacrificing flexibility for better speeds and more capacity.

 

.

Link to comment
Share on other sites

We don't support this configuration.

 

The way this is normally done is to set all of their domains as addon domains, pick a something.heliohost.org for their main domain, then put an .htaccess in the public_html folder. This keeps sites from seeing each other's files, and allows you to put "non-public" stuff in public_html alongside the addon domain docroots, with access blocked by the .htaccess file.

 

As was stated above, in order for a domain to use a docroot that's not public_html, it must be listed as an addon domain. To list the domain as an addon domain, you will need to change your main domain to something else before adding it.

Ok, where do I get a heliohost subdomain? Because I intend to follow your suggestion.

 

PS: Or do I just put "mysite.heliohost.org"?

 

Thanks!

Edited by ballagyr
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...