I get the below error while starting Apache
root# sudo apachectl configtest
[Tue Jun 28 13:31:53.686521 2022] [so:error] [pid 8913] AH06665: No code signing authority for module at /private/libexec/apache2/mod_dispatcher.so specified in LoadModule directive.
httpd: Syntax error on line 191 of /private/etc/apache2/httpd.conf: Code signing absent - not loading module at: /private/libexec/apache2/mod_dispatcher.so
To fix the above problem, I created Certificate Authority in mac machine by following - https://www.simplified.guide/macos/keychain-ca-code-signing-create and trying to codesign to sign the AEM Dispatcher module with below command
codesign --sign "XXX CA" --force --keychain ~/Library/Keychains/login.keychain-db /private/libexec/apache2/mod_dispatcher.so
But I get the following error The specified item could not be found in the keychain.
Ref - https://www.codexpedia.com/apache-server/no-code-signing-authority-for-module-php-on-mac-monterey/
Can anyone tell me if there is any problem in above command ?
My macOS version is 12.2 (Monterey)