Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error 403 forbidden,directory index forbidden

Discussion in 'General Discussion' started by Lemon Knight, Jun 29, 2017.

  1. Lemon Knight

    Lemon Knight Member

    Joined:
    Jun 29, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Website Owner
    Hi,
    I just started working on my website, which is wordpress installed. When I try to visit the websie it shows the following,"
    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."
    Upon checking the error logs i saw two errors repeating,
    [Thu Jun 29 16:28:16 2017] [error] [client 92.99.249.228] File does not exist: /home/tedxaya2/public_html/403.shtml
    [Thu Jun 29 16:28:16 2017] [error] [client 92.99.249.228] Directory index forbidden by Options directive: /home/tedxaya2/public_html/

    When I checked the file manager the .htmaccess file does not seem to exist in the public html folder where it should be.
    Please help.
    Thanks
     
  2. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    334
    Likes Received:
    95
    Trophy Points:
    28
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    If you installed Wordpress using a provisioner, it may have installed to a folder that you are not expecting eg
    Code:
    http://www.yourdomain.com/wp/
    The messages you are getting suggests there is no 'index.anything' in the webroot, and that indexes have been disabled (possibly by your web host) see your cPanel >> Advanced >> Indexes section if available

    More information on indexing can be found at Indexes - Documentation - cPanel Documentation

    If you used cPanel Site Software to install your Wordpress, or installed it manually etc, more information can be found at How to Install WordPress With cPanel - cPanel Knowledge Base - cPanel Documentation
     
    #2 rpvw, Jun 29, 2017
    Last edited: Jun 29, 2017
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know the contents of the .htaccess file in the account's home directory (/home/$username/.htaccess)? Ensure to exclude any real domain names or IP addresses.

    Thank you.
     
  4. Lemon Knight

    Lemon Knight Member

    Joined:
    Jun 29, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Website Owner
    There seems to be no .htaccess file in the main directory I've attached the contents of the home directory in the image below.
    Thank you
     

    Attached Files:

  5. Lemon Knight

    Lemon Knight Member

    Joined:
    Jun 29, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Website Owner
    I tried changing the index setting, it was at default when I checked. It showed the following error when i changed it.
    " The index settings on “/home/username/access-logs” have been updated. Its indexes are now: unavailable. Failed to alter index settings. /.htaccess: Permission denied " .
    I belive the issue is with the .htaccess file?
    Thank You.
     
  6. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    334
    Likes Received:
    95
    Trophy Points:
    28
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    If you can't see the .htaccess file in the root (home eg /home/$username) or in the webroot /public_html folder you may not have enabled Show Hidden Files (dotfiles) in the file manager or FTP client you are using. In file manager click on the Settings button top right and check the Preferences you require.

    If you get a 403 Forbidden errpr when browsing to www.yourdomain.tld, look in the /public_html folder for any other sub folders where your Wordpress site might have been installed in eg /wp

    The only other possibility is that you installed wordpress to a sub-domain located outside of web root, and have not configured the document root for the sub-domain. The cutoff screenshot gave no indication of there being sub-domain folders in the area that we can see.
     
    #6 rpvw, Jun 30, 2017
    Last edited: Jun 30, 2017
  7. Lemon Knight

    Lemon Knight Member

    Joined:
    Jun 29, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Website Owner
    The public html has a wp sub folder but there is no .htaccess file in either the public_html folder or the wp folder. i used the cpanel instal scripts option to instal WP so I don't think there is a sub folder outside the web root. Neither do I see one part from the one in the public_html root folder.

    Thank you.
    :public_htmll.png public_html:wp.png
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,766
    Likes Received:
    313
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Top right corner of File Manager is a Settings button. Check it to make sure Show hidden (dot files) option is checked.
     
  9. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    334
    Likes Received:
    95
    Trophy Points:
    28
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    So if you browse to
    Code:
    http://yourdomain.tld/wp
    do you not see your Wordpress site ?
     
  10. Lemon Knight

    Lemon Knight Member

    Joined:
    Jun 29, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Website Owner
    I do. When I use /wp, however it should be working without /wp, I changed the setting on wordpress to do that.
     
  11. Lemon Knight

    Lemon Knight Member

    Joined:
    Jun 29, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Website Owner
    Thanks, found it. The .htaccess file shows this

    # BEGIN WordPress

    # END WordPress
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The error message likely appears because no index file exists in the public_html directory. You'd need to move the installation over to the public_html directory if you want it to open when accessing the domain name. WordPress documents how to do this at:

    Moving WordPress « WordPress Codex

    Thank you.
     
Loading...

Share This Page