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?


Works: sld.tld/subdomainroot/Y

Fails subdomain.sld.tld/Y

  • What is the domain? Shared hosting? Do you have a hosting control panel like cPanel or Plesk? – danlefree Dec 22 '11 at 21:55
  • I have several all of which are currently down (by my own doing to prevent people from seeing what I am currently working on). Yes. cPanel. – MisterCrazy8 Dec 22 '11 at 22:02
  • 1
    What do your Apache error logs for the subdomains show when a request errors out? Have you inquired about this issue with your hosting provider? – danlefree Dec 22 '11 at 22:11

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:


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.


In my case, the following was working: www.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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.