[Flask] Need help deploying using mod_wsgi (Apache)

Brian Kim bk at breadtech.com
Wed Feb 10 02:49:25 EST 2016


Hi King Kong,

I've run into the same issue as you have before and I feel like this should
be better documented.
The problem is that you've placed your app in a directory that apache
doesn't acknowledge.
To fix this, you want to edit your /etc/apache2/apache2.conf file and add
in the follow lines:

<Directory /Z/flask/>
  Options Indexes FollowSymLinks
  AllowOverride None
  Require all granted
</Directory>

Let me know if this works for you.

BK

On Wed, Feb 10, 2016 at 1:24 AM, Lars Peter Søndergaard <lps at chireiden.net>
wrote:

> On Wed, 10 Feb 2016 13:57:28 +0800 King Kong <kingkong88 at gmail.com>
> wrote:
>
> > nitori, does that mean that I must first convert my app into a
> > package with a __init__.py file?
>
> No, not necessarily.
>
> > I am now hitting a 403 Forbidden (You don't have permission to
> > access /api on this server.)  Log shows: [authz_core:error] [pid
> > 6817:tid 3021182000] [client 220.xxx.xxx.xxx:56401] AH01630: client
> > denied by server configuration: /Z/flask/app.wsgi. (I think my
> > app.wsgi file hasn't got the chance to run yet.)
>
> Unfortunately I don't have much experience with wsgi configuration in
> apache. So I can't really help there.
>
> --
> nitori
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160210/39174290/attachment.html>


More information about the Flask mailing list