dongxing1965 2011-11-30 10:47
浏览 48
已采纳

https跨域的数据存储/检索

A client of mine owns 2 dedicated servers - both running php 4.3. One server (the main) has lots of applications with online payments. He has install SSL key in one subdomain to run the payment procedures. So we have www.example-one.com and https://secure.example-one.com, both sharing the same databases.

Now, on his other server (www.example-two.com), he wants to upgrade to latest php/mysql. He wants to install another ssl there (https://secure.example-two.com), and he wants to transfer all applications from first secure domain, to the new one.

Is there a way to share the databases in the second server? So php scripts can still work and store/retrieve data in the database in first server (www.example-one.com)?

EDIT: the two servers (example-one and example-two are running in different IPs)

  • 写回答

3条回答 默认 最新

  • drvkf88226 2011-11-30 10:55
    关注

    Yes.

    It all depends on your physical infrastructure, but if the servers running example-one and example-two can "see" each other across the network - ideally, a non-public network running inside your hosting facility, or a well-secured VPN across the internet - you can connect the PHP apps running on www.example-two.com and secure.example-two.com to the MySQL database on example-one.com by setting the connection string to point at whatever its hostname or IP address is.

    You should NOT run this connection over the public internet or any benefit of using SSL on the web application is wiped out.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 组策略中的计算机配置策略无法下发
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
  • ¥50 mac mini外接显示器 画质字体模糊