{"action":"created","issue":{"url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/378","repository_url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi","labels_url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/378/labels{/name}","comments_url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/378/comments","events_url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/378/events","html_url":"https://github.com/GrahamDumpleton/mod_wsgi/issues/378","id":390071084,"node_id":"MDU6SXNzdWUzOTAwNzEwODQ=","number":378,"title":"Target WSGI script cannot be loaded as a python module and ImportError: No module named 'django'","user":{"login":"satishAarbor","id":43377921,"node_id":"MDQ6VXNlcjQzMzc3OTIx","avatar_url":"https://avatars1.githubusercontent.com/u/43377921?v=4","gravatar_id":"","url":"https://api.github.com/users/satishAarbor","html_url":"https://github.com/satishAarbor","followers_url":"https://api.github.com/users/satishAarbor/followers","following_url":"https://api.github.com/users/satishAarbor/following{/other_user}","gists_url":"https://api.github.com/users/satishAarbor/gists{/gist_id}","starred_url":"https://api.github.com/users/satishAarbor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satishAarbor/subscriptions","organizations_url":"https://api.github.com/users/satishAarbor/orgs","repos_url":"https://api.github.com/users/satishAarbor/repos","events_url":"https://api.github.com/users/satishAarbor/events{/privacy}","received_events_url":"https://api.github.com/users/satishAarbor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-12-12T05:31:10Z","updated_at":"2018-12-12T06:36:05Z","closed_at":null,"author_association":"NONE","body":"I'm try to deploy virtual host my django project into apache2 via mod_wsgi WSGIDaemon method, i'm using ubuntu 16.04 and i'm getting following error.\r\n\r\nFrom apache2 error log:\r\n\r\n`[Tue Dec 11 11:55:31.748517 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] mod_wsgi (pid=14231): Target WSGI script '/var/www/html/rasa_django/rasa_django/wsgi.py' cannot be loaded as Python module. [Tue Dec 11 11:55:31.748570 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] mod_wsgi (pid=14231): Exception occurred processing WSGI script '/var/www/html/rasa_django/rasa_django/wsgi.py'. [Tue Dec 11 11:55:31.748639 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] Traceback (most recent call last): [Tue Dec 11 11:55:31.748657 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] File \"/var/www/html/rasa_django/rasa_django/wsgi.py\", line 12, in [Tue Dec 11 11:55:31.748662 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] from django.core.wsgi import get_wsgi_application [Tue Dec 11 11:55:31.748677 2018] [wsgi:error] [pid 14231:tid 139821891782400] [remote ::1:44748] ImportError: No module named 'django' [Tue Dec 11 11:55:31.787336 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] mod_wsgi (pid=14231): Target WSGI script '/var/www/html/rasa_django/rasa_django/wsgi.py' cannot be loaded as Python module. [Tue Dec 11 11:55:31.787379 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] mod_wsgi (pid=14231): Exception occurred processing WSGI script '/var/www/html/rasa_django/rasa_django/wsgi.py'. [Tue Dec 11 11:55:31.787447 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] Traceback (most recent call last): [Tue Dec 11 11:55:31.787465 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] File \"/var/www/html/rasa_django/rasa_django/wsgi.py\", line 12, in [Tue Dec 11 11:55:31.787470 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] from django.core.wsgi import get_wsgi_application [Tue Dec 11 11:55:31.787484 2018] [wsgi:error] [pid 14231:tid 139821849777920] [remote ::1:38604] ImportError: No module named 'django'`\r\n\r\nIn my host file 000-default.conf:\r\n\r\n```\r\nServerName www.rasa_django.com \r\nDocumentRoot /var/www/html/rasa_django \r\nErrorLog /var/www/logs/error.log \r\nCustomLog /var/www/logs/custom.log combined\r\n\r\nAlias /static /var/www/html/rasa_django/static\r\n\r\n<Directory /var/www/html/rasa_django/static>\r\n    Require all granted\r\n</Directory>\r\n\r\n<Directory /var/www/html/rasa_django/rasa_django>\r\n    <Files wsgi.py>\r\n        Require all granted\r\n    </Files>\r\n</Directory>\r\n\r\n\r\nWSGIDaemonProcess rasa_django.com python-path=/var/www/html/rasa_django python-home=/home/aarbor_01/env_site1\r\nWSGIProcessGroup rasa_django.com\r\nWSGIScriptAlias / /var/www/html/rasa_django/rasa_django/wsgi.py\r\n```\r\n\r\n\r\nHere my wsgi.py file:\r\n\r\n```\r\nimport os\r\n\r\nfrom django.core.wsgi import get_wsgi_application\r\n\r\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rasa_django.settings')\r\n\r\napplication = get_wsgi_application()\r\n```"},"comment":{"url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/comments/446478852","html_url":"https://github.com/GrahamDumpleton/mod_wsgi/issues/378#issuecomment-446478852","issue_url":"https://api.github.com/repos/GrahamDumpleton/mod_wsgi/issues/378","id":446478852,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjQ3ODg1Mg==","user":{"login":"GrahamDumpleton","id":507637,"node_id":"MDQ6VXNlcjUwNzYzNw==","avatar_url":"https://avatars2.githubusercontent.com/u/507637?v=4","gravatar_id":"","url":"https://api.github.com/users/GrahamDumpleton","html_url":"https://github.com/GrahamDumpleton","followers_url":"https://api.github.com/users/GrahamDumpleton/followers","following_url":"https://api.github.com/users/GrahamDumpleton/following{/other_user}","gists_url":"https://api.github.com/users/GrahamDumpleton/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamDumpleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamDumpleton/subscriptions","organizations_url":"https://api.github.com/users/GrahamDumpleton/orgs","repos_url":"https://api.github.com/users/GrahamDumpleton/repos","events_url":"https://api.github.com/users/GrahamDumpleton/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamDumpleton/received_events","type":"User","site_admin":false},"created_at":"2018-12-12T06:36:05Z","updated_at":"2018-12-12T06:36:05Z","author_association":"OWNER","body":"If you want to use Anaconda Python, you want to do:\r\n\r\n```\r\nsudo a2dismod wsgi\r\nsudo apt-get uninstall libapache2-mod-wsgi-py3\r\n```\r\n\r\nand use ``pip install`` method to install mod_wsgi in the Python virtual environment.\r\n\r\nThen create a ``wsgi.load`` file in the ``mods-available`` directory of Apache which contains the output from running:\r\n\r\n```\r\nmod_wsgi-express module-config\r\n```\r\n\r\nThen run:\r\n\r\n```\r\nsudo a2enmod wsgi\r\n```"}}
{"actor":{"display_login":"GrahamDumpleton"}}