Deploying a web application on your Linux ArcGIS Server site on Amazon Web Services (AWS) requires some preparation. Follow the steps below to expose your application in a secure and stable manner. You will need to perform some of these steps in the AWS Management Console or a similar third-party client to Amazon Web Services.
- Create a site using ArcGIS Server Cloud Builder on Amazon Web Services.
- Add rules to your site's Amazon security group to allow the following:
- SSH access (typically through port 22) for your IP address. This allows you to log in and configure your instance.
- HTTP access (typically through port 80) for the IP range of your choosing.
- Using SSH, log in to the site server instance. This is the instance containing the configuration store. It is marked as SITEHOST when you view your list of instances in the AWS Management Console. Unless otherwise noted, perform the remainder of these steps while logged in to this instance.
To log in, enter the following command:
ssh -i <your key pair file> ubuntu@<Public DNS of your AWS instance>
- Start Apache using the following command:
sudo service apache2 start
- Configure Apache so that it starts whenever the operating system starts. Use the following command:
sudo update-rc.d apache2 defaults
- Using the AWS Management Console or another client to AWS, allocate an Elastic IP address and associate it with the site server instance in your site (remember, this is the instance to which you logged in).
The Elastic IP address is necessary because Amazon Web Service changes the machine name whenever you stop and start a site. The Elastic IP gives you a constant address that you can use for accessing your ArcGIS Server.
- Deploy your web application by copying it to Apache's root folder, /var/www/.
- Optionally, communicate with your network administrator to register a domain name for your site.
In most cases, you'll want to create a domain name such as mymaps.mycity.gov instead of directing users through your Elastic IP. Provide your Elastic IP address to your network administrator and he or she can associate a domain name that points traffic to your site.
- Update any URLs in your web application code.
- Flex and Silverlight applications—Use the URLs containing the address of the Elastic Load Balancer (ELB) that Cloud Builder placed on your site. For example, http://<ELB address>/arcgis/rest/services/MyService/MapServer. Flex and Silverlight can access web services through the ELB address because client access policy files were automatically added to the site.