1

I am trying to copy Apache server setup file wsgi.conf to httpd/conf.d folder when deploying myapp via elastic beanstalk. However, after deployment, if I sftp to httpd/conf.d I don't see my file.

myapp folder structure:

myapp/ - .ebextension --- configuration.conf - folderx - foldery - wsgi.conf 

in the configuration.conf file i have the following:

container_commands: 04_wsgireplace: command: "cp ../wsgi.conf /etc/httpd/conf.d/wsgi.conf" 

after deployment, in the eb deployment logs I see success for the copy command.

  1. are the relative paths I'm using correct?
  2. what am I doing wrong?

PS. What I want to achieve is set a rewrite rule for http --> https re-directions. Is there an alternative solution for this?

Thanks.

1 Answer 1

0

I wish I could find something more official, but I did find several references (1,2) to folks using something like this:

container_commands: 04_wsgireplace: command: "cp wsgi.conf ../wsgi.conf" 

or

container_commands: 04_wsgireplace: command: "cp .ebextensions/wsgi.conf ../wsgi.conf" 

It depends on where in your project you've stored wsgi.conf, I assume. I'm about to try it myself (for a flask project), and I'll report back!

Update: I tried it out (with wsgi.conf in .ebextensions), and it worked (for me).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.