python - SSL setup on AWS Elasticbeanstalk single instance - No Load Balancer -


i have django/python based web application have been deploying aws past year. need ssl setup our users can sign , make payments online.

i've integrated stripe checkout js , trying self signed ssl certificate, for testing, run on dev aws eb instance.

i went through aws documentation here http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ssl.singleinstance.html#createsslconfig.singleinstance

and, config file:

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/sslpython.singleinstance.html

now when deploy aws instance, getting following errors:

2015-09-29 23:07:48 utc-0400    error   [instance: *****] command failed on instance. return code: 1 output: error occurred during build: command hooks failed . 2015-09-29 23:07:47 utc-0400    error   script /opt/elasticbeanstalk/hooks/appdeploy/enact/01flip.py failed returncode 1 

i not sure going on or how go debugging these errors.

here config file:


  resources:    sslsecuritygroupingress:    properties:      cidrip: 0.0.0.0/0     fromport: 443     groupid:        ref: awsebsecuritygroup     ipprotocol: tcp     toport: 443   type: "aws::ec2::securitygroupingress"   files:    /etc/httpd/conf.d/ssl.conf:    content: |       loadmodule wsgi_module modules/mod_wsgi.so       wsgipythonhome /opt/python/run/baselinenv       wsgisocketprefix run/wsgi       wsgirestrictembedded on       listen 443       <virtualhost *:80>         servername myserver         redirect permanent / https://myserver       </virtualhost>        <virtualhost *:443>         servername myserver           sslengine on         sslcertificatefile "/etc/pki/tls/certs/server.crt"         sslcertificatekeyfile "/etc/pki/tls/certs/server.key"          alias /static/ /opt/python/current/app/static/         <directory /opt/python/current/app/static>         order allow,deny         allow         </directory>          wsgiscriptalias / /opt/python/current/app/application.py          <directory /opt/python/current/app>         require granted         </directory>          wsgidaemonprocess wsgi-ssl processes=1 threads=15 display-name=%{group} \           python-path=/opt/python/current/app:/opt/python/run/venv/lib/python2.7/site-packages user=wsgi group=wsgi \           home=/opt/python/current/app         wsgiprocessgroup wsgi-ssl       </virtualhost>   group: root   mode: "000755"   owner: root   /etc/pki/tls/certs/server.crt:    content: "-----begin certificate-----\n\       ********=\n\       -----end certificate-----\n\       \x20\n"   group: root   mode: "000400"   owner: root   /etc/pki/tls/certs/server.key:    content: |       -----begin rsa private key-----       *******       -----end rsa private key-----   group: root   mode: "000400"   owner: root   packages:    yum:    mod24_ssl: [] 

i created private key, certificate key , self signed certificate using openssl when ssh'ed ec2 instance under ec2-user. in cases, i've seen people have these files in /var/www/html/. have files in home directory, cause problem?

any ideas of how diagnose or there better approach setting ssl on single eb instance?

thank you.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -