I have a Mac Mini Server, running macOS Sierra (10.12.2) with macOS Server (5.2). This comes with a built-in Apache server, which is set up to listen on ports 80 and 443. This works fine; documents are accessible over both HTTP and HTTPS.
However, as soon as I use the SSLRequireSSL
directive in the .htaccess file, it stops working. In the browser, when accessing https://www.example.com/path/document
, I see the following:
Forbidden
You don't have permission to access /path/document on this server.
Apache Server at www.example.com Port 80
Note that the error message mentions port 80, even though it is served over HTTPS / port 443 (I checked this with curl - so browser redirects aren't an issue here). But this could be related to the source of the problem.
In the Apache error log, the following is shown:
[Sun Jan 29 16:38:07.674342 2017] [ssl:error] [pid 82204] [client 127.0.0.1:50195] AH02219: access to /Users/Glorfindel/wwwroot/path/document failed, reason: SSL connection required
Other directives in the .htaccess file do work (e.g. Options -Indexes
).