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 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?