Mobile app version of vmapp.org
Login or Join
Candy875

: Why does my link to a Subdomain not work? My hosting provider has problems. I put Drupal on a sub-domain of my site. When I try logging in or clicking a link it comes to a Internal server

@Candy875

Posted in: #Subdomain #WebHosting

My hosting provider has problems. I put Drupal on a sub-domain of my site. When I try logging in or clicking a link it comes to a Internal server error. But if I navigate to the actual directory it works fine. What should I do?

Examples:

Works: sld.tld/subdomainroot/Y

Fails subdomain.sld.tld/Y

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Candy875

2 Comments

Sorted by latest first Latest Oldest Best

 

@Fox8124981

In my case, the following was working: domain.com/subdomain
But subdomain.domain.com was not.

I realized that my default index was: /subdomain/index.htm. I renamed it to /subdomain/index.html.

Now, subdomain.domain.com is working.

Note: it should be place to force to look for index.htm too, but I think I can't access to those config files with my free account.

10% popularity Vote Up Vote Down


 

@Sims2060225

Pending concrete info from the logs of both the subdomain and second-level domain, my best guess is that the problem is caused by, either:


having nested/overlapping document roots (which Apache generally does not like),
the subdomain is misconfigured in Apache
the Drupal install is configured to use the first web root


Generally web apps are designed to be accessed from a single web root. If you access it from another web root, the routing or URL rewrite rules could cause errors.

You really shouldn't have your domains set up like that anyway. Besides causing potential glitches, it's also insecure. I prefer a directory structure like this:

~/htdocs/domain1.tld/wwwroot
~/htdocs/domain2.tld/wwwroot
~/htdocs/sub.domain1.tld/wwwroot
~/htdocs/sub.domain2.tld/wwwroot


This way, you can keep secure files for each site/app outside of its doc root (as well as install shared libraries). In your current configuration, you could keep files above subdomainroot and it would still be accessible because it's in your parent domain's doc root.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme