I'm trying to build a BCHS application. I do have a remote server running OpenBSD, but the network latency is killing me, so I decided to develop on my MacBook Air and deploy to the OpenBSD server later.
I haven't installed Apache yet (and don't think I'll need it), but httpd
seems to be a built-in utility of macOS.
~
❯ httpd -v
Server version: Apache/2.4.28 (Unix)
Server built: Oct 9 2017 19:54:20
I tried to start httpd
with the following methods, but they didn't work:
❯ launchctl enable httpd
Unrecognized target specifier. <service-target> takes a form of <domain-target>/<service-id>.
Please refer to `man launchctl` for explanation of the <domain-target> specifiers.
Usage: launchctl enable <service-target>
~
❯ launchctl start httpd
~
❯ launchctl list | grep httpd
~
❯ httpd
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
TL;DR
I want to launch httpd
as a daemon. How do I do that?
httpd -v Server version: Apache/2.4.28 (Unix)
. The common command to start httpd issudo apachectl start
for httpd bound to ports <1024. – klanomath Feb 15 '18 at 11:42sudo apachectl start
"? – JMY1000 Feb 15 '18 at 19:07