Apache Forbidden

Discussion in 'Web Design and Development' started by mokujin, Jan 18, 2015.

  1. mokujin, Jan 18, 2015
    Last edited: Jan 18, 2015

    mokujin macrumors newbie

    Joined:
    Jan 17, 2015
    #1
    Hello,

    I changed
    DocumentRoot to "/Users/dat/Dropbox/web"
    <Directory "/Users/dat/Dropbox/web">

    chmod web folder to 644 and get Forbidden.

    Do you know what's wrong?
    Thank you :)
     
  2. Brian Y macrumors 68040

    Joined:
    Oct 21, 2012
    #2
    Can you pastebin your entire config file, and ls -al /Users/Dropbox/dat/web.

    Is anything shown in error.log?
     
  3. mokujin thread starter macrumors newbie

    Joined:
    Jan 17, 2015
    #3
    Hi,
    thank you for your reply.
    I got this after ls -al /Users/thanhdat/Dropbox/www
    Code:
    total 0
    drwxr-xr-x@  10 thanhdat  staff   340 Jan 18 21:59 .
    drwx------@  16 thanhdat  staff   544 Jan 18 22:04 ..
    drwxr-xr-x@   7 thanhdat  staff   238 Jan 18 22:00 bootstrap
    drwxr-xr-x@  10 thanhdat  staff   340 Jan 18 22:00 learn
    drwxr-xr-x@  10 thanhdat  staff   340 Jan 18 22:01 phpmyadmin
    drwxr-xr-x@   8 thanhdat  staff   272 Jan 18 22:00 shop
    drwxr-xr-x@   3 thanhdat  staff   102 Jan 18 22:00 tuanvu
    drwxr-xr-x@ 100 thanhdat  staff  3400 Jan 18 22:01 upload
    drwxr-xr-x@  77 thanhdat  staff  2618 Jan 18 22:01 vb3
    drwxr-xr-x@  20 thanhdat  staff   680 Jan 18 22:00 xenforo
    And error log:
    Code:
    [Sun Jan 18 22:17:05.622256 2015] [core:error] [pid 981] (13)Permission denied: [client 192.168.1.138:50698] AH00035: access to / denied (filesystem path '/Users/thanhdat/Dropbox/www') because search permissions are missing on a component of the path
    [Sun Jan 18 22:17:05.834166 2015] [core:error] [pid 981] (13)Permission denied: [client 192.168.1.138:50698] AH00035: access to /favicon.ico denied (filesystem path '/Users/thanhdat/Dropbox/www') because search permissions are missing on a component of the path
    [Sun Jan 18 22:17:08.234748 2015] [core:error] [pid 981] (13)Permission denied: [client 192.168.1.138:50698] AH00035: access to / denied (filesystem path '/Users/thanhdat/Dropbox/www') because search permissions are missing on a component of the path
    [Sun Jan 18 22:17:08.332498 2015] [core:error] [pid 981] (13)Permission denied: [client 192.168.1.138:50698] AH00035: access to /favicon.ico denied (filesystem path '/Users/thanhdat/Dropbox/www') because search permissions are missing on a component of the path
     
  4. jsavvy macrumors member

    jsavvy

    Joined:
    Aug 19, 2011
    #4
    Is the error a 403 Forbidden error in the browser? If so, paste your site configuration.
     
  5. mokujin, Jan 19, 2015
    Last edited: Jan 19, 2015

    mokujin thread starter macrumors newbie

    Joined:
    Jan 17, 2015
    #5
  6. Darth.Titan macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #6
    Your first post shows the root directory being at /Users/dat/Dropbox/web

    Then you showed the ls -la results from /Users/thanhdat/Dropbox/www

    Which is it, web or www?

    Also, I'm assuming that you just included a snippet from your config file and that you have the requisite </Directory> tag (and everything in between).

    Are you restarting Apache after changing the site config?
     
  7. mokujin, Jan 19, 2015
    Last edited: Jan 20, 2015

    mokujin thread starter macrumors newbie

    Joined:
    Jan 17, 2015
    #7
    Hi,
    sorry, it's /Users/thanhdat/Dropbox/www
    (I could not remember exactly the dir)


    I solved, http://wiki.apache.org/httpd/13PermissionDenied

    Thanks all for your reply.
     

Share This Page