Territan

Q: El Capitan Server 403 Forbidding Personal Web Sites, and Other Shenanigans

I look forward to a clear, simple solution to this problem that I never would have thought of. Really, I do.

 

I have a number of web services installed on my MBP for experimentation purposes, though there's one in particular I've really been keeping notes in. And now I can't get to them, because they're all coming up with 403 errors.

 

Specifically...

 

Forbidden

You don't have permission to access /dokuwiki/ on this server.
Server unable to read htaccess file, denying access to be safe

 

I tried putting an .htaccess file in there, but it doesn't like it. Or can't read it. And I've seen it suggested that one should check in the Server app and try to Edit Permissions in the Websites tab.

 

Which brings me to my other problem: I go to the Websites page in Server, click Edit Permissions, and get a very simple box that doesn't do what it should. To the connection "Allow connections from:" I get the choices of "all networks," "private networks," and "only some networks." I can select "all networks," and I still get the 403 error. I can select "only some networks" and add "This Mac" to the list, and I still get the 403 error.

 

I'm beginning to suspect a permissions error of some sort at the command line level, but how should I set ownership and permissions?

MacBook Pro (17-inch 2.4 GHz), OS X El Capitan (10.11.2), 750Gb HD

Posted on Jan 26, 2016 11:24 AM

Close

Q: El Capitan Server 403 Forbidding Personal Web Sites, and Other Shenanigans

  • All replies
  • Helpful answers

  • by Territan,

    Territan Territan Jan 28, 2016 8:40 AM in response to Territan
    Level 1 (9 points)
    Mac OS X
    Jan 28, 2016 8:40 AM in response to Territan

    Right, I think I fixed it. Maybe. I'm just not so sure about this fix.

     

    In Console, in /var/log/apache2/error.log, here was the error provided:

     

    [Thu Jan 28 11:04:37.841059 2016] [core:crit] [pid 61762] (13)Permission denied: [client 127.0.0.1:50455] AH00529: /Library/Server/Web/Data/Sites/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/Library/Server/Web/Data/Sites/' is executable

     

    The thing that got it working was:

     

    sudo chmod +x /Library/Server/Web/Data/Sites

     

    It couldn't be that simple, could it?

  • by noidski,

    noidski noidski Feb 25, 2016 4:42 PM in response to Territan
    Level 1 (0 points)
    Feb 25, 2016 4:42 PM in response to Territan

    you are my hero.  thank you

  • by Dr.karnam,

    Dr.karnam Dr.karnam Aug 10, 2016 7:46 AM in response to Territan
    Level 1 (4 points)
    Aug 10, 2016 7:46 AM in response to Territan

    I have the same problem ......but no knowledge on console or terminal ...I would like you to please help me , a doctor in a step by step solution if you would not mind

     

    Forbidden

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

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

  • by Territan,

    Territan Territan Aug 10, 2016 8:22 AM in response to Dr.karnam
    Level 1 (9 points)
    Mac OS X
    Aug 10, 2016 8:22 AM in response to Dr.karnam

    Dr. Karnam, I'm not sure it can be fixed easily without using Console or Terminal, so I'm going to try to walk you through Console first, then Terminal as needed.

     

    Also, the problem you're having now might not be related to the problem I was having, so we need to look at that first. And that means looking at a log file or two.

     

    MacOS is a very complex beast. It has a lot of tasks running at the same time under the hood. And in order for people to see what's going on, many of these tasks have log files open where they post notifications, warnings, errors, etc. Reading those log files may tell you what's going on. But those log files end up in a lot of different places, and each one might contain extraneous information that you're not interested in.

     

    Console (/Applications/Utilities/Console.app) is the program you'd use to look at those log files. It's possible to look at them from the command line, but the Console utility gives you a more controlled environment for log-surfing.

     

    When you open Console, you ought to see a list of folders and files in a sidebar on the left. This lets you choose which log file to browse. If you don't see that sidebar, look in the toolbar above for a button titled Show Log List. That should make the sidebar appear.

     

    However you get to that sidebar, you're looking first for /var/log, then within that for apache2, and then within that for error.log. Those first two will have disclosure triangles to show the files within, and the last is just a filename.

     

    Here's another fun detail about Console that gives it a leg-up over Terminal: It's updated in real-time. Once you have the error.log file up, you'll see in Console whenever Apache throws an error. If you don't see anything recent or relevant-looking in the log file (log entries are usually time-stamped), call up Safari and try getting to your web page again. That should write another error.

     

    Just to remind you, the issue I had was a "Permission Denied." The problem was either that /Library/Server/Web/Data/Sites/.htaccess wasn't "readable," or /Library/Server/Web/Data/Sites wasn't "executable."

     

    Let's find out what the specific error is from the error.log. Fortunately, you can select and copy from Console. Throw it in a reply here, and we'll take a look at it. Or if you have other questions, please ask.

  • by Dr.karnam,

    Dr.karnam Dr.karnam Aug 10, 2016 9:11 AM in response to Territan
    Level 1 (4 points)
    Aug 10, 2016 9:11 AM in response to Territan

    Dear Mr.Territan

     

    Wonderful to see a reply so fast. Unfortunately i couldn't see a errorlog , while i did see a app firewall.log

     

    Here is my problem , i bought a educational cam call hoover cam solo8 and wanted to go back to the website to get more information and check upgrade to the software , unfortunately got this (http://www.thehovercam.com/)

    Forbidden

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

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

     

    Regarding your advice which was in-fact too good . I wasn't able to reach a file called error log under apache2. I am stuck now and cannot go any further. I therefore would like your advice and help.

     

    regards

  • by Territan,

    Territan Territan Aug 10, 2016 9:51 AM in response to Dr.karnam
    Level 1 (9 points)
    Mac OS X
    Aug 10, 2016 9:51 AM in response to Dr.karnam

    Oogh. Now that I understand the problem a little better, yes, my advice may have been a bit much. The problem I was having was accessing a web site that was supposed to be served up by my own computer.

     

    You were accessing a remote site, something hosted elsewhere on the internet. Typically you don't have any control over that, and a "Forbidden" message like that usually means that they have something misconfigured. It happens from time to time; web servers get maintenance and updates, and sometimes they don't go smoothly. The best thing to do there is either use whatever Contact information to tell them there's a problem with the website, or wait for them to fix it themselves.

     

    And for what it's worth, the general site thehovercam.com seems to be up and running.

  • by Dr.karnam,

    Dr.karnam Dr.karnam Aug 10, 2016 11:18 PM in response to Territan
    Level 1 (4 points)
    Aug 10, 2016 11:18 PM in response to Territan

    Dear Tertian,

     

    Thank you for so much information and the advice. I shall try to contact the website support to help me out .

     

    regards