Reputation: 55
GOAL : I am trying to deploy my Flask app to make it public on the web. I have my own server which runs on Ubuntu 18.04
TUTORIAL : As it is the first time I am doing this, I am following this tutorial. All his steps are perfectly working for me except the last one. However, in this tutorial he used Linode and I use my own server so I directly code on my terminal
PROBLEM : In his last step after systemctl reload apache2
when I go on the my browser and type my ip address (found using ifconfig) that I put in webApp.conf (192.168.1.25) I get the following error :
ERROR LOGS : As asked I went into the error.log which outputs the following :
You can find the code here : https://pastebin.com/g2rzRUXE
POTENTIAL PROBLEMS: From what I understand I am having two issues :
Set the 'ServerName' directive globally to suppress this message
. So I tried to solve it using this tutorial and I changed my private ip address to my public ip address (found on whatismyip.com) but when doing so I received the following error:
Please let me know how I could solve these problems or the other ones in the error log that I might not have seen.
I hope I was clear enough. If you need any additional info I can edit my question. I am running out of ideas so if you have any tips I would be grateful.
Upvotes: 0
Views: 310
Reputation: 22952
In the logs, I can read:
Apache/2.4.29 (Ubuntu) mod_wsgi/4.5.17 Python/2.7 configured -- resuming normal operations
So, you are using Python 2 instead of Python 3.
You need to install a mod_wsgi
module compatible with Python 3.
Follow the instruction available here : https://modwsgi.readthedocs.io/en/develop/user-guides/quick-installation-guide.html
The following link can also help: https://stackoverrun.com/fr/q/12335951 (in French).
Upvotes: 1