Add a weebhook in the Settings/Webhooks page of your respostory.
github-webhook-handler.phpto your server and copy the URL to it.
Fill in the webhooks page.
ssh to your server.
#if you are using Apache as web server, change `www-data` to `www`
Save your webhook.