非80端口上的PayPal IPN [英] PayPal IPN on port other than 80
本文介绍了非80端口上的PayPal IPN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有人尝试在80以外的端口上使用Paypal的IPN?
Has anybody tried using Paypal's IPN on a port other than 80?
我正在尝试指定类似 http://domain.com:8080的URL /url/to/ipn.php ,但IPN请求未通过.
I'm trying to specify a URL like http://domain.com:8080/url/to/ipn.php but the IPN request isn't getting through.
如果我直接从浏览器中访问该URL,它将正常工作.
If I hit the URL directly from my browser it works fine.
推荐答案
如果您有可以通过ssh访问它的nginx服务器,则可以执行以下操作:
If you have nginx server with possibility to access to it by ssh, then you can do:
启动ssh反向代理:
ssh -Nvv -o TCPKeepAlive=yes -R 3000:localhost:3000 username@your-server.com
添加nginx配置以代理端口80上的端口3000:
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;
}
}
这篇关于非80端口上的PayPal IPN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文