Thank you, thats one error less.
Unfortunately now after setting up FlaskApp after this I am still recieving an internal server error. My code is as follows:
(flaskapp.wsgi:)
activatethis = ’/var/www/FlaskApp/FlaskApp/venv/bin/activatethis.py’
execfile(activatethis, dict(file=activatethis))
!/usr/bin/python
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0,“/var/www/FlaskApp/”)
from FlaskApp import app as application
application.secret_key = ‘xxxx’
(FlaskApp.conf:)
<VirtualHost *:80>
ServerName 146.185.173.57
ServerAdmin ndplokkaar@hotmail.com
WSGIScriptAlias / /var/www/FlaskApp/flaskapp.wsgi
<Directory /var/www/FlaskApp/FlaskApp/>
Require all granted
</Directory>
Alias /static /var/www/FlaskApp/FlaskApp/static
<Directory /var/www/FlaskApp/FlaskApp/static/>
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Unfortunately I still get this error:
[Wed Dec 06 20:41:25.869637 2017] [wsgi:error] [pid 14713] [client 77.172.80.110:60506] modwsgi (pid=14713): Target WSGI script ’/var/www/FlaskApp/flaskapp.wsgi’ cannot be loaded as Python module.
[Wed Dec 06 20:41:25.869987 2017] [wsgi:error] [pid 14713] [client 77.172.80.110:60506] modwsgi (pid=14713): Exception occurred processing WSGI script ’/var/www/FlaskApp/flaskapp.wsgi’.
[Wed Dec 06 20:41:25.870060 2017] [wsgi:error] [pid 14713] [client 77.172.80.110:60506] Traceback (most recent call last):
[Wed Dec 06 20:41:25.870128 2017] [wsgi:error] [pid 14713] [client 77.172.80.110:60506] File “/var/www/FlaskApp/flaskapp.wsgi”, line 12, in <module>
[Wed Dec 06 20:41:25.870387 2017] [wsgi:error] [pid 14713] [client 77.172.80.110:60506] from FlaskApp import app as application
[Wed Dec 06 20:41:25.870463 2017] [wsgi:error] [pid 14713] [client 77.172.80.110:60506] ImportError: No module named FlaskApp
If been trying to remove this error all day, but I cant seem to figure it out. How can I work this out?
Kind regards
Firstly I deployed my code in ubuntu by following all these steps it gives me 405 error then I uninstall apache and delete all files and deployed it again this time it gives 500 error what’s the issue in the deployment
I have another in FlaskApp.confirm how much spacentre should be between servername and ip address