Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a file structure like this:

public/admin
public/some folder
includes/  

I set up a sub-domain page.mysite.com and I pointed the directory to be mysite.com/page/public/admin. I thought that it would work ok, but it seems that it's not loading contents that are outside of admin (in this case target folder), so it can't see any files outsite admin.

What could the problem be?

P.S. I have a shared hosting, so I can access only Cpanel and FTP (just in case you know).

share|improve this question

migrated from stackoverflow.com Oct 25 '11 at 2:31

This question came from our site for professional and enthusiast programmers.

1 Answer 1

If your shared hosting is on a LAMP stack it is probably using a virtual host in Apache to handle the requests for the sub domain.

The Apache configuration will define /page/public/admin as the DocumentRoot of the sub domain page.mysite.com.

The Apache user can only access files to which it has permissions - in a shared setup like yours, this is likely to only be in child directories of the root directory, not in parent directories.

So, this is not a problem, it is a plan of your provider - it protects all files at a higher level than your public web root.

If you had a shell on the server you could use chown to give the appropriate permissions. However, with the limited access you have, I'd imagine your only route forward is to move all the files you need into a sub directory of /page/public/admin.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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