从cpanel上的shared-ip连接到aws

时间:2015-03-05 20:13:55

标签: php amazon-web-services amazon-ec2

我在aws上安装了neo4j并且运行正常。我已经将tcp 7474设置为我的ip并且ssh工作正常。我可以从我的mamp-PHP连接到aws,因为我已将my-ip添加到安全组中。

如果从Anywhere = 0.0.0.0 / 0设置I TCP / IP,我将无法访问它。我可以从shared-ip(cpanel-PHP)连接吗?

我真的很感激任何帮助。过去3天我一直在努力。

<?php

$data2 ='CREATE (Person:Person {name:”test”}) RETURN Person';
$data2 = array("query" =>$data2);
$data_string = json_encode($data2);


$ch = curl_init('http://aws_ip:7474/db/data/cypher');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Content-Length: ' . strlen($data_string))
);


$result = curl_exec($ch);

echo $result;

?>

0 个答案:

没有答案