386
|
1 <?xml version="1.0"?>
|
|
2
|
|
3 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd">
|
|
4
|
|
5 <article name="Setting up development environment with nginx on Amazon EC2"
|
|
6 link="/en/docs/howto_setup_development_environment_on_ec2.html"
|
|
7 lang="en">
|
|
8
|
|
9 <section>
|
|
10
|
|
11 <para>
|
|
12 As an ISV participating in AWS Solution Providers Program, nginx is
|
|
13 offering an automated install script for use with AWS EC2 instances.
|
|
14 This helper script is targeted at the developers who have just
|
|
15 started using nginx and EC2, and who would like to get things up quickly
|
|
16 and efficiently. Please check the action list below in order to
|
|
17 prepare your virtual machine and nginx configuration.
|
|
18 </para>
|
|
19
|
|
20 <para>
|
|
21 To setup a development environment:
|
|
22 <list>
|
|
23 <item>
|
|
24 Follow the
|
|
25 <link url="http://docs.amazonwebservices.com/AWSEC2/latest/GettingStartedGuide/Welcome.html">
|
|
26 Get Started with EC2</link> guide to sign up to AWS and
|
|
27 launch your EC2 instance. Only Amazon Linux is supported, so please
|
|
28 choose either "Basic 32-bit Amazon Linux AMI" or
|
|
29 "Basic 64-bit Amazon Linux AMI" for an AMI. When configuring
|
|
30 the firewall rules it is necessary to add a rule to accept web
|
|
31 traffic on port 80.
|
|
32 </item>
|
|
33
|
|
34 <item>
|
|
35 As soon as the new instance is launched, log in to it and
|
|
36 download <literal>aws_nginx_setup.sh</literal> script with the
|
|
37 following command:
|
|
38 <programlisting>
|
|
39 wget http://nginx.org/download/aws_nginx_setup.sh
|
|
40 </programlisting>
|
|
41 then run the script with root privileges:
|
|
42 <programlisting>
|
|
43 sudo sh ./aws_nginx_setup.sh
|
|
44 </programlisting>
|
|
45 </item>
|
|
46
|
|
47 <item>
|
|
48 You will be asked to select what components to install. Currently
|
|
49 it is possible to choose Django, Pyramid, Ruby on Rails or PHP
|
|
50 development environment. After you have selected the necessary
|
|
51 component the script will automatically prepare its configuration
|
|
52 for use with nginx. There will be a separate user created too,
|
|
53 and then a sample web application is started to ensure everything
|
|
54 is working correctly.
|
|
55 </item>
|
|
56
|
|
57 <item>
|
|
58 After the installation completes and the web application is installed
|
|
59 in a subdirectory inside /var/www, the script will print how to
|
|
60 start/stop sample application. For example, the Rails application will
|
|
61 reside in /var/www/rails, and Rails specific part of nginx configuration
|
|
62 will be in /etc/nginx/conf.d/rails.conf.
|
|
63 Installed application and configs can be used as a basis for
|
|
64 futher development.
|
|
65 </item>
|
|
66 </list>
|
|
67 </para>
|
|
68
|
|
69 </section>
|
|
70
|
|
71 </article>
|