tama88

Member
Dec 8, 2011
8
0
51
cPanel Access Level
Website Owner
I have tried to create a sub domain for my company's website. Sine I'm not professional in IT so I just copy-cat what so. did before. I copied files in another folder (for my main website) to my own-created folder. I tried the website and it had 403 error:

"Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."

Can so. tell me why this happened? Is there a problem with my code files (I use php) or with my own-created folder? Thanks a ton!
 

Infopro

Well-Known Member
May 20, 2003
17,112
513
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
This and your other question, are really better asked of your host. They can teach you many things about your account.

Short of that: When you access your main domain.com via your browser you're actually visiting the public_html directory.
When you create a sub.domain.com you do not create the directory itself, the system does it for you when you actually create a sub domain from within cPanel interface.
cPanel > Domains section > Subdomains.

With the sub domain created from there in cPanel, lets say you called it tama.yourdomain.com, to access that directory to place your files for the website, lets say you're using the cPanel File Manager to upload files, you'll be uploading your files to this directory:
/public_html/tama/

Now when you visit tama/yourdomain.com you'll see the new site on the subdomain as expected.

HTH!
 

tama88

Member
Dec 8, 2011
8
0
51
cPanel Access Level
Website Owner
Thanks for replying. I actually followed the same direction (creating a subdomain first, then uploading files to the folder) but it doesn't work. Is there any other explanation for this problem?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,237
94
178
Finland
cPanel Access Level
Root Administrator
"Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."
Very often 403 errors come from mod_security rule.
And whatever the reason is for those errors, the best place to contact is your host. They are able to see the logs and most likely are able to tell you exactly what is causing the errors.
 

Infopro

Well-Known Member
May 20, 2003
17,112
513
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Thanks for replying. I actually followed the same direction (creating a subdomain first, then uploading files to the folder) but it doesn't work. Is there any other explanation for this problem?
Sure, its just a matter of finding out whats going on before it can be explained. Lets start small:
Create a new text file, in it, type HELLO WORLD! and save that file as index.html to your desktop. Next upload it into that sub domain you created. Then, open the sub domain URL: tama.yourdomain.com

Does it say HELLO WORLD! or no? If no, what do you see exactly?

In your cPanel, find the Error Log icon and click. See any new errors listed there that say something having to do with this new index.html you just uploaded and tried to access? If yes, what exactly does the log say?
 

salentospiaggia

Registered
Feb 11, 2012
1
0
51
cPanel Access Level
Website Owner
Sure, its just a matter of finding out whats going on before it can be explained. Lets start small:
Create a new text file, in it, type HELLO WORLD! and save that file as index.html to your desktop. Next upload it into that sub domain you created. Then, open the sub domain URL: tama.yourdomain.com

Does it say HELLO WORLD! or no? If no, what do you see exactly?

In your cPanel, find the Error Log icon and click. See any new errors listed there that say something having to do with this new index.html you just uploaded and tried to access? If yes, what exactly does the log say?
i wrote hello world and it comes out,
but when i put another index file doesnt' work....
i have other subdomain and all works good,
but maybe is the template not good?

thank you