开发者

PayPal IPN on port other than 80

Has开发者_如何学Python anybody tried using Paypal's IPN on a port other than 80?

I'm trying to specify a URL like http://domain.com:8080/url/to/ipn.php but the IPN request isn't getting through.

If I hit the URL directly from my browser it works fine.


After doing multiple tests I was able to confirm that PayPal's Notification URL/notify_url can not contain a non-standard port number.

These urls will work:

http://my.website.com:80/ipnpage.aspx
https://my.website.com:443/ipnpage.aspx

These will not work:

http://my.website.com:81/ipnpage.aspx
https://my.website.com:82/ipnpage.aspx


If you have nginx server with possibility to access to it by ssh, then you can do:

Start ssh reverse proxy:

ssh -Nvv -o TCPKeepAlive=yes -R 3000:localhost:3000 username@your-server.com

Add nginx config to proxy a port 3000 on port 80:

server {
    listen       80;
    server_name  your-app.your-server.com;

    location / {
      proxy_pass          http://localhost:3000;
      proxy_set_header    Host             $host;
      proxy_set_header    X-Real-IP        $remote_addr;
      proxy_set_header    X-Forwarded-For  $proxy_add_x_forwarded_for;
      proxy_set_header    X-Client-Verify  SUCCESS;
      proxy_read_timeout 1800;
      proxy_connect_timeout 1800;
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜