Database Reference
In-Depth Information
Wrapper integration. If you wish to start or stop eXist, you can run sudo service
eXist-db start or sudo service eXist-db stop .
eXist will run under the exist user account on the machine, and the folders /usr/
local/exist and /exist-data must have appropriate read/write permissions for the
exist user. By default, these are set up and configured correctly for you. If you want
to access or modify files in those folders, it is best to su to the exist user.
eXist has been configured to listen on the standard 8080 TCP port, but for security
the EC2 firewall has been enabled to allow access to the machine instance only on
ports 80 (HTTP) and 22 (SSH). Thus, if you want to access eXist from the Web, be
aware that it has been proxied behind the Nginx web server on port 80, as described
in “Reverse proxying” on page 185 . The Nginx configuration file is located at /etc/
nginx/nginx.conf . It is currently configured to forward just the REST Server interface;
however, commented out in that same file is an example of forwarding the RESTXQ
Server interface. If you wish to start or stop Nginx, you can run sudo service nginx
start or sudo service nginx stop .
Administering. As only the REST Server is accessible from the Web on the EC2
instance, you may wonder how you can work with your eXist server and administer it
using all of the functionality that you are used to. The answer is to forward a TCP
port from your own development/admin machine to your eXist server when you
need to get at the full eXist server. You can do so by making use of port tunneling in
SSH.
For example, consider the following OpenSSH client command:
ssh -i ~/ec2-keys/aretter.pem -L8181:localhost:8080
ec2-user@ec2-107-22-152-27.compute-1.amazonaws.com
This command would connect by SSH to your EC2 instance (in this example, the
EC2 host is ec2-107-22-152-27.compute-1.amazonaws.com ) and forward the TCP
port 8181 on your local machine to port 8080 (the port that eXist is listening on) on
the remote EC2 instance. This means that you can use the hostname localhost and the
port 8181 on your local machine to connect to the remote eXist using your web
browser, the Java Admin Client, WebDAV, and so on.
The eXist admin user password for the EC2 instance that you cre‐
ate, will be set to the ID of your instance the first time it is run. It is
strongly recommended that your first task should be to change
this!
The SSH command shown is for Unix, Linux, and Mac systems, but you can achieve
the same result from Windows systems using an SSH client for Windows (e.g.,
PuTTY , shown in Figure 15-10 ).
Search WWH ::




Custom Search