Under Sonoma (Mac M1) I get httpd error 256 #4915
Replies: 3 comments 3 replies
-
Check the error log for httpd, it should show you what went wrong. |
Beta Was this translation helpful? Give feedback.
-
I am having the same issue. I've actually been troubleshooting this for 2 weeks and I am frustrated as seemingly no solution can be found. M1 Macbook AirSonoma 14.4.1 Brew Config
Brew Doctor
StartupI ran Brew Services List
TroubleshootingI have reinstalled brew httpd multiple times. Most recently, I uninstalled it and ran Error log1) httpd error_log: This is weird because after the reinstall, my error log located in
2) System Log Files: I was however able to get more up to date logs by checking the system logs.
SummarySo after reinstalling httpd and checking the logs, it isn't clear what is going on. This works without issue on my M2 work macbook pro, but not on my personal M1 macbook air. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the spam. I am updating because I believe I found a solution that may help someone in the future. This solution assumes that the error_log does not show errors or the errors are outdated. I have found many posts reporting the issue of logs being empty or showing outdated logs, and it is very frustrating because volunteers who try to help ask for logs and are unable to help when those logs are empty. For anyone else experiencing the problem of empty logs and Error 256, this is how I fixed the problem. Solution
it outputs:
In another discussion I found the suggestion to try running this command and see the output. In my case:
This indicated that httpd doesn't have permission to write to error_log.
Check permissions
For anyone unclear about permissions, this shows that the
This results in permissions -rw-rw-rw- which allows groups and users to write to the file, and by extension, whatever user httpd is using. Testing solutionNow when I run
there is no error in the terminal. In a second terminal, I ran
and it is showing the command I ran in the first terminal with the correct timestamp indicating it is working. I went back to the first terminal and killed process with
This finally caused the error to go away and be replaced with "started"
I restarted the computer and listed brew services again confirming it is still running. Finally, I navigated to localhost:8080 and see "It Works". |
Beta Was this translation helpful? Give feedback.
-
Output of
brew config
Output of
brew doctor
Description of issue
Hello,
I want to Install a SSL webserver under Sonoma at my Mac. I install Homebrew and httpd at my Mac. I hate the console.
I change the listen to 80 and the document path.
uwerasche@raschesserver ~ % brew services start httpd
==> Successfully started
httpd
(label: homebrew.mxcl.httpd)uwerasche@raschesserver ~ % brew services list
Name Status User File
httpd started uwerasche ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist
No problem. In the httpd.conf I load only the module:
#Uwe:
LoadModule cache_socache_module lib/httpd/modules/mod_cache_socache.so
I get:
uwerasche@raschesserver ~ % brew services list
Name Status User File
httpd error 256 uwerasche ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist
In the next step:
uwerasche@raschesserver ~ % codesign --sign ${myName} --force --keychain ~/Library/Keychains/login.keychain-db /opt/homebrew/Cellar/httpd/2.4.58/lib/httpd/modules/mod_cache_socache.so
/opt/homebrew/Cellar/httpd/2.4.58/lib/httpd/modules/mod_cache_socache.so: replacing existing signature
uwerasche@raschesserver ~ % codesign -dv --verbose=4 "/opt/homebrew/Cellar/httpd/2.4.58/lib/httpd/modules/mod_cache_socache.so"
Executable=/opt/homebrew/Cellar/httpd/2.4.58/lib/httpd/modules/mod_cache_socache.so
Identifier=mod_cache_socache
Format=Mach-O thin (arm64)
CodeDirectory v=20400 size=757 flags=0x0(none) hashes=18+2 location=embedded
VersionPlatform=1
VersionMin=917504
VersionSDK=917504
Hash type=sha256 size=32
CandidateCDHash sha256=f0842d7ebafb5d389b207ce279659c219b107c22
CandidateCDHashFull sha256=f0842d7ebafb5d389b207ce279659c219b107c226d45dd47cf997ad818a3b3bb
Hash choices=sha256
CMSDigest=f0842d7ebafb5d389b207ce279659c219b107c226d45dd47cf997ad818a3b3bb
CMSDigestType=2
Executable Segment base=0
Executable Segment limit=32768
Executable Segment flags=0x0
Page size=4096
CDHash=f0842d7ebafb5d389b207ce279659c219b107c22
Signature size=8980
Authority=Developer ID Application: Rasche-Software (KH23P8U5C6)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=19. Nov 2023 at 10:18:15
Info.plist=not bound
TeamIdentifier=KH23P8U5C6
Sealed Resources=none
Internal requirements count=1 size=180
Now I get again the error
uwerasche@raschesserver ~ % brew services start httpd
==> Successfully started
httpd
(label: homebrew.mxcl.httpd)uwerasche@raschesserver ~ % brew services list
Name Status User File
httpd error 256 uwerasche ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist
What can I do ?
Beta Was this translation helpful? Give feedback.
All reactions