Skip to content

Instantly share code, notes, and snippets.

@e28eta
Created January 19, 2017 04:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e28eta/92e178f4f8c51575f27d910c599c834e to your computer and use it in GitHub Desktop.
Save e28eta/92e178f4f8c51575f27d910c599c834e to your computer and use it in GitHub Desktop.
Per [HT205290](https://support.apple.com/en-us/HT205290), every time Xcode service is restarted, or Server.app is updated, Apache will redirect `GET /` to `GET /xcode/` Which is something I definitely don't want on a shared web server. I think this launchd plist will automatically prevent that.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.djackson.XcodeRedirectDisable</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>[[ -a COM.APPLE.WEBAPP.XCODE.conf ]] &amp;&amp; mv COM.APPLE.WEBAPP.XCODE.conf COM.APPLE.WEBAPP.XCODE.conf.disabled</string>
</array>
<key>WatchPaths</key>
<array>
<string>/Library/Server/Web/Config/apache2/other</string>
</array>
<key>WorkingDirectory</key>
<string>/Library/Server/Web/Config/apache2/other/</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment