DWQA QuestionsCategory: ProgramIs there any special requirement for deploying flask to Apache?
fanne asked 1 month ago

I have a simple hands-on project, a page submits the form content (i.e. version number). After submitting, the server obtains the version information and starts SVN to obtain the version, add, submit and other operations.
The project directly app. Run () can complete these functions normally.
But after the project is put into the Apache server, after the page submits the form, the page keeps loading in circles. I feel that the back end hasn’t received the request for processing. Why?
Is there any special requirement for deploying flask to Apache?
Fill in the code information, which friend would you like to give me some advice
GitHub upload code information
About configuration content supplement:
Apache uses Wamp server’s
Add the following to http.conf

Include conf/extra/httpd-vhosts.conf

The content in httpd-vhosts.conf is

<VirtualHost *:80>
    ServerName localhost 
    WSGIScriptAlias / D:/wamp/www/project/wsgi_handler.wsgi
    <Directory D:/wamp/www/project>
            Order deny,allow
            Allow from all
    </Directory>
</VirtualHost>

Page access is normal
Is there any special requirement for deploying flask to Apache?
But when you fill in the form, you can’t execute it after you submit it.
Is there any special requirement for deploying flask to Apache?
It has been loading and cannot be submitted to the service for execution.

1 Answers
phodal answered 1 month ago

Under the production environment, no one will directly run the flask with nginx. You should add a layer in the middle.GunicornWSGI containers like.

JoshYuJump replied 1 month ago

Nginx + uwsgi can be used in the production environment.