Flask is a Python based micro-framework, which can be used to create dynamic websites, APIs, and many other applications.
Despite all Linux cloud ...
For further actions, you may consider blocking this person and/or reporting abuse
Hi William, thank you for the amazing article. I was facing a small issue with VHost.conf file in tag.
Error:
AH01630: client denied by server configuration: C:/git/wsgi_scripts/yourapp.wsgi
Solution:
It worked for me with
<Directory C:/git>
instead of<Directory C:/git/yourapp>
Also deploying it with flask there was an issue with few other packages like Pandas and Scikit-Learn where the flask was hanging.
So to solve this I added one line
WSGIApplicationGroup %{GLOBAL}
in httpd.conf under - ReferenceI also hope this helps others.
Thank you for the feedback and these other hints Shreyans!
Thanks Shreyans - I encountered an issue when just importing spacy in the flask app
adding WSGIApplicationGroup %{GLOBAL} fixed it
Also regarding the Error:
AH01630: client denied by server configuration:
Changing the directive from
to
worked for me.
Hi William,
I followed steps as you said..I am trying to diploy dash application. When i run server, webpage keeps running without any results. Any specific things needs to be considered?? Please help me on this.
Regards
Ganesh
Hello Ganesh, I am trying to deloy a dash application as well under wampserver stack ( it's a Web server stack package including apache). the app is not rendered, I still get "it works!" in the web page when I test it. I would like your guidance if you've managed to succesfully deploy it. Thanks.
Sorry Ganesh, I didn't get notified of your post. I'm not sure about "dash application", but I recommend that you check the Apache logs on C:\Apache24\logs , to see if any error was recorded.
Hi William, Thanks for the article. I am just having trouble booting up apache after adding the Config lines in httpd.conf file. Getting this in my error logs -
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Already checked that Encodings module is present and python is correctly installed.
Can you please help?
Hi william,
Thanks for the great article. Although, I am stuck at a problem while executing command at step-4 i.e. "mod_wsgi-express module-config" in command prompt. It is throwing "failed to create process" error. I have also searched many articles on the internet but did not find the solution. Kindly guide me through this error, if you know this.
Thanks
Thank you William for this detailed article. I am a complete newbie trying to deploy a dash application (mainly a Flask app) in windows environment. I have apache server already set up under wampserver (in my understanding it's a Web server stack package including apache ). However, I followed the steps as if apache is not there yet. Now, after completion, the app test (localhost test) is still returning "it works!" instead of the actual app.
I am stuck at this point, I would appreciate any comment of suggestion.
PS1: the app was tested in localhost and it works perfectly
PS2: my team uses wampserver for integrating other tools and apps, so this choice is kinda out of my hand. However, I am open to any other suggestions to rectify this.
Thanks for the post.
Apache is robust but it doesn't support well socket communication on Windows.
Thank you for the feedback. I still need to learn more about Apache, are you saying it might face issues once it needs to handle multiple connections?
Hi William,
Can u plz tell how to update hosts file to test the app locally.
Hi deepank2596,
On Windows the hosts file is usually on C:\Windows\System32\drivers\etc . I believe it's a good idea to make a backup in case you make a mistake, and depending on your settings you might need admin access to edit the file. Once you edit it, you can add entries like this one:
127.0.0.1 willtest.com
It points to a fake address that I can type on my browser to simulate going to a real address. Besides that you can always use localhost on your browser to test the app locally.
Hi William,
after starting Apache, localhost shows just Forbidden site with error 403. Any advice?
I also get HTTP 403 Forbidden
EDIT: Change the
<Directory C:/git/yourapp>
to<Directory C:/git>
as described in the comment above.Thanks for sharing this William!