Subdomains do not work after cpanel update

Status
Not open for further replies.

tsikerde

New Member
Messages
7
Reaction score
1
Points
1
This used to work before the cpanel update.

I have domain names at cloudflare pointing to the new server at 198.91.81.12. tsikerdekis.com A points to the IP CNAME michael points to tsikerdekis.com

Yet when I access tsikerdekis.com it redirects me to the website (currently there is a drupal error but that is fine), but, when I access michael.tsikerdekis.com I get a page "Apache is functioning normally", which is the domain-less response you get from accessing 198.91.81.12. directly.

How do I add a subdomain to my account to correctly points to tsikerdekis.com?

In the old panel, the subdomains could added directly but in the new I can add only for michael.tsikerdekis.x10host.com, which doesn't work either way.
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
252
Points
63
I was able to accomplish this by adding my additional domain to DirectAdmin. Then, click the default domain button and change your default domain to your additional non-x10 domain. Then, when you add a subdomain, it will force you to use the additional domain and the x10 subdomain will not be available.
 

Anna

I am just me
Staff member
Messages
11,772
Reaction score
591
Points
113
If the domain previously was a parked domain, it would now be a domain pointer. Pointers are "dumb", they can not hold any configurations of their own, they will only duplicate the default domain.

So in order to get a subdomain with the pointer, an exact match must exist on the default domain.

Optionally, you can remove the domain from pointers and set it as an extra domain using "Add New" under "Domain Setup". It would then get its own separate public_html folder so you'd need to copy contents you want it to display to that folder. It would be under domains/THE_DOMAIN/public_html
 

tsikerde

New Member
Messages
7
Reaction score
1
Points
1
So I renamed the default domain to tsikerdekis.com and set two subdomains, but now I get this when I try to access thanos.tsikerdekis.com
This is a placeholder for the subdomain thanos.tsikerdekis.x10host.com

I don't get it :S
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
252
Points
63
I think this is a default file DA throws in the folder for this subdomain's public_html. The subdomain lives in a subfolder of your main domain.

I just created a test subdomain and this is the same thing I see.
 

Anna

I am just me
Staff member
Messages
11,772
Reaction score
591
Points
113
The system may be a bit delayed with some updates, which means that parts of the system probably still recognized your x10host.com domain as the default and named the file after that. Just remove it and put the contents you wish into that folder.
 

tsikerde

New Member
Messages
7
Reaction score
1
Points
1
It did update after a while, now it is showing thanos.tsikerdekis.com

But, how do I point this subdomain to the drupal installation instead of the placeholder?
 

tsikerde

New Member
Messages
7
Reaction score
1
Points
1
I can see there is two folders of my subdomains inside public_html. Is there any way to instead point to my main folder without these subfolders?
 

tsikerde

New Member
Messages
7
Reaction score
1
Points
1
This is not possible. For security reasons, I cannot put an .htaccess on the subdomain folder and point it to the parent folder. Any other options?

Btw, through apache configuration this is extremely easy to fix. Even cpanel supports setting the root directory of a subdomain.
 

tsikerde

New Member
Messages
7
Reaction score
1
Points
1
I figured out a hackish solution. I am using Drupal so your milage may vary. Here is the two files you need to make this work:

index.php
<?
chdir("../");
include("index.php")
?>

.htaccess
RewriteEngine On
Redirect 301 /sites http://tsikerdekis.com/sites
 

spacresx

Community Advocate
Community Support
Messages
2,203
Reaction score
196
Points
63
@ tsikerde
Another option to install drupal (or other script) into a sub-directory, (folder)
is download it from their website, then upload the install files to the sub-directory.
that way the default paths can be set for the sub-directory during the install,
instead of putting it in the root. (public_html) directory
just putting it out there.
 
Status
Not open for further replies.
Top