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 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog