mod-wsgi

Python: Can't connect to HTTPS URL because the SSL module is not available

Python: Can't connect to HTTPS URL because the SSL module is not available Question: I’m trying to connect to Stripe to setup payments. I have it working on my dev machine, but when I push to prod, I get the following SSL error: Can’t connect to HTTPS URL because the SSL module is not available. …

Total answers: 1

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

AWS Elastic Beanstalk – Script timed out before returning headers: application.py

AWS Elastic Beanstalk – Script timed out before returning headers: application.py Question: I have an existing Elastic Beanstalk flask app on AWS that occasionally will not initialize and gives the following error: [Mon Jan 23 10:06:51.550205 2017] [core:error] [pid 7331] [client 127.0.0.1:43790] script timed out before returning headers: application.py [Mon Jan 23 10:10:43.910014 2017] [core:error] …

Total answers: 2

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

Python – why can I import modules without __init__.py at all?

Python – why can I import modules without __init__.py at all? Question: I’m new to Python and I still can’t get my head around why we need a __init__.py file to import modules. I have gone through other questions and answers, such as this. What confuses me is that I can import my modules without …

Total answers: 5

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

Debugging Apache/Django/WSGI Bad Request (400) Error

Debugging Apache/Django/WSGI Bad Request (400) Error Question: My simple Django app worked fine in debug mode (manage.py runserver), and works under WSGI+Apache on my dev box, but when I pushed to EC2 I began receiving intermittent (10-80% of the time) errors of Bad Request (400) for any URLs I try to view (whether in my …

Total answers: 3

How to install & configure mod_wsgi for py3

How to install & configure mod_wsgi for py3 Question: I installed & configured mod_wsgi for python2.7 but now I would also like to have mod_wsgi for py3 I’m in ubuntu 12.04 My apache conf file looks like this for py2.7 : <Directory /var/www/vhosts/my_web> WSGIProcessGroup my_web WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory> Now I …

Total answers: 3

Unable log in to the django admin page with a valid username and password

Unable log in to the django admin page with a valid username and password Question: I can’t log in to the django admin page. When I enter a valid username and password, it just brings up the login page again, with no error messages This question is in the django FAQ, but I’ve gone over …

Total answers: 26