mod-wsgi

Run mod_wsgi with pyenv

最后都变了- 提交于 2020-08-09 08:17:47
问题 I'm trying to run a python web app on Apache server. I have installed mod_wsgi: sudo apt-get install libapache2-mod-wsgi . This is my site config file: <virtualhost *:80> ServerName 192.168.60.144 WSGIDaemonProcess myapp.dev processes=1 threads=1 python-home="/home/user/.pyenv/versions/3.6.1" python-path="/home/user/API" home='/home/user/API' WSGIProcessGroup myapp.dev WSGIScriptAlias / /home/user/API/config_files/myservice.wsgi.py <Directory /home/user/API> Order allow,deny Allow from all <

ContentType doesn't declare an explicit app_label

断了今生、忘了曾经 提交于 2020-08-05 05:16:49
问题 I am deploying a Django 1.10 project onto an Ubuntu server with Apache and mod_wsgi. I am getting the following 500 error which I can't solve: RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS. installed_apps in settings.py: INSTALLED_APPS = [ 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib

overwrite python3 default encoder when using apache server

半世苍凉 提交于 2020-06-16 04:36:11
问题 I am running an apache server which serves a framework called ingenious Getting UnicodeDecodeError('ascii' when reading a file with hebrew chars. I've read that you can change the default preferred encoding of python3 using environment variables. So I have edited the /etc/httpd/conf/httpd.conf using the [setenv][3] method: SetEnv LC_ALL en_US.UTF-8 SetEnv LANG en_US.UTF-8 SetEnv LANGUAGE en_US.UTF-8 SetEnv PYTHONIOENCODING utf8 And restart the server using sudo service httpd restart and still

AttributeError: 'module' object has no attribute 'lru_cache'

£可爱£侵袭症+ 提交于 2020-06-16 03:13:36
问题 Im getting the error as shown in title with this environment setup. Apache2 with mod_wsgi ,Python 3.5, Django 2.0.2 . I'm using virtualevn. my virtual env is in : /home/santosh/Documents/project/project/ and django app is in /home/santosh/Documents/project/Reports Below is the content of wsgi.py file import os, sys sys.path.append('/home/santosh/Documents/project/Reports/Reports') sys.path.append('/home/santosh/Documents/project/Reports') sys.path.append('/home/santosh/Documents/project

AttributeError: 'module' object has no attribute 'lru_cache'

心已入冬 提交于 2020-06-16 03:13:33
问题 Im getting the error as shown in title with this environment setup. Apache2 with mod_wsgi ,Python 3.5, Django 2.0.2 . I'm using virtualevn. my virtual env is in : /home/santosh/Documents/project/project/ and django app is in /home/santosh/Documents/project/Reports Below is the content of wsgi.py file import os, sys sys.path.append('/home/santosh/Documents/project/Reports/Reports') sys.path.append('/home/santosh/Documents/project/Reports') sys.path.append('/home/santosh/Documents/project

Name duplicates previous WSGI daemon definition

元气小坏坏 提交于 2020-05-10 07:34:08
问题 I'm changing the domain name of a site. For a period I want the old domain name and the new domain name to point to the site. I'm running a Python Django site. My original Apache2 conf works fine and the basis is: <VirtualHost *:80> ServerAdmin name@gmail.com ServerName originalsite.co.uk ServerAlias www.originalsite.co.uk DocumentRoot /var/www/originalsite WSGIDaemonProcess originalsite python-path=/var/www/originalsite:/var/www/originalsite/env/lib/python2.7/site-packages WSGIProcessGroup

Django memory usage going up with every request

我只是一个虾纸丫 提交于 2020-05-09 17:47:53
问题 I moved my first Django project from DjangoEurope to Webfaction, and that started an issue looking like a memory leak. With every single request memory usage of the server process goes up about 500kb. It never goes down. This goes on until Webfaction kills it for using too much memory. I can clearly see this when I refresh the Django's admin interface in my browser (although this happens with every single page, not only with admin interface - I though admin interface would be a nice test case

Not able to deploy Django restfule service using WAMP and mod_wsgi

浪尽此生 提交于 2020-04-30 06:32:48
问题 I am trying to deploy an API built on Django rest-framework using mod_wsgi and WAMP. When I created a new Django project using 'django-admin startproject Predictor' and deployed it on WAMP, it was working fine as I can see the default Django window. Now I created an app in the project using 'python manage.py startapp Predictor' I built an API which accepts GET call and tested it using 'python manage.py runserver' and it was working fine. Now I started WAMP service again and try to go to

Flask - WSGI - No module named 'flask'

耗尽温柔 提交于 2020-04-07 14:21:48
问题 I've been following Sentdex' Flask tutorial. He's using a Venv to set up his Flask, but didn't set his Python up to work with a Venv. I've tried installing Flask globally - yet it still doesn't work. Trying to browse to the server returns a 500 Internal Server Error I'm getting the usual no module named flask error. errorFGL.log [Sun Feb 05 11:22:32.043925 2017] [wsgi:error] [pid 26340:tid 118578538694400] [client 86.52.205.25:49814] mod_wsgi (pid=26340): Target WSGI script '/var/www-fgl