Skip to content

Instantly share code, notes, and snippets.

@joey-coleman
Last active August 29, 2015 14:00
Show Gist options
  • Save joey-coleman/11111811 to your computer and use it in GitHub Desktop.
Save joey-coleman/11111811 to your computer and use it in GitHub Desktop.
Node.js/Ghost as a OS X webapp

Running Node.js + Ghost as a webapp on OS X Mavericks with Server 3.2

It's a real pain in the arse to set these things up.

<?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">
<!-- /Library/Server/Web/Config/apache2/webapps/ca.sheepspace.jwc.ghost.plist -->
<!-- See man pages for webapp.plist(8) and webappctl(8) for information about this example webapp.plist -->
<plist version="1.0">
<dict>
<key>name</key>
<string>ca.sheepspace.jwc.ghost</string>
<key>displayName</key>
<string>Ghost Blog engine for jwc.sheepspace.ca</string>
<key>includeFiles</key>
<array>
<string>/Library/Server/Web/Config/apache2/httpd_ca.sheepspace.jwc.ghost.conf</string>
</array>
<key>sslPolicy</key>
<integer>0</integer>
</dict>
</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">
<!-- /Library/LaunchDaemons/ca.sheepspace.jwc.node.plist -->
<plist version="1.0">
<dict>
<key>Label</key>
<string>ca.sheepspace.jwc.node</string>
<key>RunAtLoad</key>
<false/>
<key>KeepAlive</key>
<true/>
<key>UserName</key>
<string>jwc</string>
<key>WorkingDirectory</key>
<string>/Users/jwc/Sites/ghost-test/</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/npm</string>
<string>start</string>
<string>/Users/jwc/Sites/ghost-test/</string>
</array>
<key>StandardOutPath</key>
<string>/Users/jwc/Sites/jwc.sheepspace.ca.log</string>
<key>StandardErrorPath</key>
<string>/Users/jwc/Sites/jwc.sheepspace.ca.err.log</string>
</dict>
</plist>
# /Library/Server/Web/Config/apache2/httpd_ca.sheepspace.jwc.ghost.conf
ProxyPass / balancer://balancer-group-webapp-ca.sheepspace.jwc.ghost--/
ProxyPassReverse / balancer://balancer-group-webapp-ca.sheepspace.jwc.ghost--/
BalancerMember balancer://balancer-group-webapp-ca.sheepspace.jwc.ghost--/ http://localhost:2368
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment