apache

Why does `flask_bootstrap` fail to import?

Why does `flask_bootstrap` fail to import? Question: When running a flask app, Apache2’s error.log shows that the flask_bootstrap module cannot be found: [wsgi:warn] mod_wsgi: Compiled for Python/2.7.11. [wsgi:warn] mod_wsgi: Runtime using Python/2.7.12. [mpm_event:notice] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured — resuming normal operations [core:notice] AH00094: Command line: ‘/usr/sbin/apache2’ [wsgi:error] mod_wsgi (pid=18587): Target WSGI script ‘/var/www/myapp/myapp.wsgi’ …

Total answers: 2

Install mod_wsgi on Ubuntu with Python 3.6, Apache 2.4, and Django 1.11

Install mod_wsgi on Ubuntu with Python 3.6, Apache 2.4, and Django 1.11 Question: How do I get mod_wsgi for Apache2 that was compiled for Python 3.6.1? (or any future Python version) I am using a Python 3.6.1 virtual environment with Django 1.11 and Everything is working according to the Apache error log except that mod_wsgi …

Total answers: 2

Steps to Troubleshoot "django.db.utils.ProgrammingError: permission denied for relation django_migrations"

Steps to Troubleshoot "django.db.utils.ProgrammingError: permission denied for relation django_migrations" Question: What are some basic steps for troubleshooting and narrowing down the cause for the “django.db.utils.ProgrammingError: permission denied for relation django_migrations” error from Django? I’m getting this message after what was initially a stable production server but has since had some changes to several aspects of …

Total answers: 6

ImportError: No module named django.core.wsgi (ubuntu)

ImportError: No module named django.core.wsgi (ubuntu) Question: I am following this guide to configure apache for my django web application: https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/modwsgi/#basic-configuration I have installed Django, mod_wsgi-express (the new way) and mod_wsgi for apache on an ubuntu 15.10 server using: pip install Django pip install mod_wsgi sudo aptitude install libapache2-mod-wsgi Next I have added the below …

Total answers: 4

'No module named flask', when I run through a URL

'No module named flask', when I run through a URL Question: My files are placed as below in the apache shared hosting server – /public_html/cgi-bin — myenv (directory – virtual env) — hello.cgi — myapp.py the .htaccess is in the root directory. Now when I activate the virtual environment and run the myapp.py file – …

Total answers: 3

Invalid command WSGIDaemonProcess Deploy Django application on CentOS 6.7

Invalid command WSGIDaemonProcess Deploy Django application on CentOS 6.7 Question: I am using Django 1.8 on CentOS 6.7 with Apache Server version: Apache/2.2.15 (Unix). I have followed the steps in How To Serve Django Applications with Apache and mod_wsgi on CentOS 7. But at last step when I start the Apache server with command : …

Total answers: 6

Mod wsgi not using virtualenv python version on Arch linux

Mod wsgi not using virtualenv python version on Arch linux Question: I have a website running on apache-python2(virtualenv)-flask stack on Arch linux server. It seems that wsgi application is not picking up the python from virtualenv, and instead uses system’s python. web/test.py import sys print(sys.version) Result in: error_log 3.4.3 (default, Mar 25 2015, 17:13:50) The …

Total answers: 1

Django populate() isn't reentrant

Django populate() isn't reentrant Question: I keep getting this when I try to load my Django application on production . I tried all the stackoverflow answers but nothing has fixed it. Any other ideas. (I’m using Django 1.5.2 and Apache) Traceback (most recent call last): File “/var/www/thehomeboard/wwwhome/wsgi.py”, line 37, in <module> application = get_wsgi_application() File …

Total answers: 6

Multiple virtualhosts for two python sites, one dominates

Multiple virtualhosts for two python sites, one dominates Question: I’m trying to get an apache server configured on a Mac server to serve both a Web2Py app and a Flask application. This has become a mild nightmare. I would like the users to be able to go to the following urls http:/my.domain.com/ – Web2py site …

Total answers: 1

OSError – Errno 13 Permission denied

OSError – Errno 13 Permission denied Question: I am trying to upload image through admin page, but it keeps saying: [Errno 13] Permission denied: ‘/path/to/my/site/media/userfolder/2014/05/26’ the folders userfolder/2014/05/26 are created dynamically while uploading. In Traceback, i found that the error is occuring during this command: In /usr/lib64/python2.6/os.py Line 157. while calling mkdir(name, mode) meaning, it …

Total answers: 8