-
Edit the Apache2 plist file with whatever editor you like (example using vim):
$ sudo vim /System/Library/LaunchDaemons/org.apache.httpd.plist
-
Add the following to the the plist file:
<key>EnvironmentVariables</key> <dict> <key>PATH</key> <string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin</string> </dict>
-
Restart Apache2
$ sudo /usr/sbin/apachectl stop $ sudo /usr/sbin/apachectl start
Last active
April 27, 2022 12:56
-
-
Save srayhunter/5208619 to your computer and use it in GitHub Desktop.
Configure Apache on Mac OSX with Environment Variables
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm getting the same issue.
Solution: For my case (same than SubhajitSarkar)
I have put the environment variables in the ~/.profile (I'm using zsh on M1)
And now it is working properly on Monterrey.