0

I have a apache reverse proxy set up which works beautifully, only allowing my own IP:

<Proxy http://192.168.0.184:8080*>
    Order deny,allow
    Deny from all
    Allow from my.own.ip.which.works
</Proxy>

I want to be able to add a second rule allowing bitbucket.org's servers access to specifically /bitbucket-hook/:

#allow bitbucket.org access to bitbucket/webhook endpoint
<Proxy http://192.168.0.184:8080/bitbucket-hook/>
    Order allow,deny
    Deny from all
    Allow from *.compute-1.amazonaws.com
</Proxy>

but everything ends up with a 403:

ec2-18-234-32-224.compute-1.amazonaws.com - - [10/Nov/2019:22:13:02 +0100] "POST /bitbucket-hook/ HTTP/1.1" 403 3869 "-" "Bitbucket-Webhooks/2.0"

I assume that *.compute-1.amazonaws.com should do it. But this doesn't work...

what can I do instead?

0

The solution is to use a location statement like this:

# Allow bitbucket.org access to bitbucket/webhook endpoint
<Location /bitbucket-hook>
  Order Deny,Allow
  Deny from all
  Allow from compute-1.amazonaws.com
</Location>

Note that any subdomain which is below compute-1.amazonaws.com will satisfy this rule.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.