Hi,
I have successfully deployed BaseX on an Amazon Web Services instance using the "Elastic Beanstalk application container" and the BaseX79.WAR distribution. The REST interface works as is demonstrated by going to http://drpbasex2.elasticbeanstalk.com/rest/?run=xq/countries.xq&country=...
Now I try to connect to BaseX using the PHP implementation of a BaseX Client (BaseXClient.php). I can't figure out what connection parameters to use though. For "host" I tried drpbasex2.elasticbeanstalk.com (the web address), ec2-54-93-168-77.eu-central-1.compute.amazonaws.com (used for SSH connecting) and 54.93.168.77 (the public IP address Amazon Web Services indicates for this instance) For "port" I tried 1984 (default) and 8984 For "user" and "password" I used the BaseX defaults (admin/admin) I tried any combination of the above parameters but I always get an "can't connect to targe computer" in the socket_connect() line of BaseXClient.php (running from localhost)
I can think of a number of reasons why the connection is refused:
Credentials Should the credentials be something different from admin/admin? Should I maybe actively set credentials for the REST interface in web.xml?
Inbound ports In the BaseX instance on Amazon Web Services(AWS) I can configure ports for inbound traffic, for example port 22 for SSH access. It might be needed to allow access for port 1984 or 8984, but the only way to do that is to use a 'Custom TCP' protocol. I already did that and it makes no difference. What protocol should be used?
No connection allowed from localhost? Maybe connecting from localhost is not allowed?
Any help pointing me in the right direction is appreciated.
Paul