Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Steps
- ##Purge old apache
- for pid in $(ps aux |grep httpd |awk '{print$2}');do sudo kill -9 $pid; done
- sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
- ##Build new apache
- brew tap djl/homebrew-apache2
- brew install djl/apache2/apache24
- echo 'httpd="/usr/local/Cellar/apache24/2.4.9/bin/httpd/httpd"' >> ~/.bash_profile && exec bash
- ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pcre-8.35.mavericks.b
- ######################################################################## 100.0%
- ==> Pouring pcre-8.35.mavericks.bottle.tar.gz
- ? /usr/local/Cellar/pcre/8.35: 146 files, 5.8M
- ==> Installing apache24
- ==> Downloading http://mirror.cc.columbia.edu/pub/software/apache/httpd/httpd-2.4.9.tar.gz
- ######################################################################## 100.0%
- ==> tar -xzf httpd-2.4.9-deps.tar.gz
- ==> ./configure --prefix=/usr/local/Cellar/apache24/2.4.9 --mandir=/usr/local/Cellar/apach
- ==> make
- ==> make install
- ? /usr/local/Cellar/apache24/2.4.9: 1379 files, 27M, built in 95 seconds
- bash-3.2$
- ## run my glob patcher
- sudo atom /System/Library/LaunchDaemons/org.apache.httpd.plist
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- <plist version="1.0">
- <dict>
- <key>Disabled</key>
- <true/>
- <key>Label</key>
- <string>org.apache.httpd</string>
- <key>EnvironmentVariables</key>
- <dict>
- <key>XPC_SERVICES_UNAVAILABLE</key>
- <string>1</string>
- </dict>
- <key>ProgramArguments</key>
- <array>
- --> <string>/usr/local/Cellar/apache24/2.4.9/bin/httpd</string>
- <string>-D</string>
- <string>FOREGROUND</string>
- </array>
- <key>OnDemand</key>
- <false/>
- </dict>
- </plist>
- terminal exit/restart (exec bash does NOT work here)
- sudo mkdir /usr/local/etc/apache2/available &&\
- sudo echo -e "\nInclude /usr/local/etc/apache2/*.conf" >> /usr/local/etc/apache2/httpd.conf
- sudo apachectl restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement