How to publish a django project using Apache on CentOS 7?

0 like 0 dislike
7 views
Wrote a simple blog in django-learn django. Now cannot publish it.
The project wrote this guide metanit.com
that is, first django-admin startproject djangoblog
then python manage.py startapp myblog

Have server on CentOS 7, at frontage Nginx as a proxy to the backend Apache to have different php projects
Next I wanted to publish a django project, but it turns out the error 500.
ServerName test.mydomian.ru ErrorLog "/var/www/html/django/error_log" #logs temporarily here CustomLog "/var/www/html/django/access_log" combined Alias /static /var/www/html/django/djangoblog Require all granted Require all granted WSGIDaemonProcess djangoblogpython-path=/var/www/html/django:/var/www/html/virtualenv/djangoblog/lib/python2.7/site-packages WSGIProcessGroup djangoblog WSGIScriptAlias / /var/www/html/django/djangoblog/djangoblog/wsgi.py 

In the log:
[Fri Feb 01 15:40:46.703194 2019] [:error] [pid 16899] [remote 192.168.1.6:0] mod_wsgi (pid=16899): Target WSGI script '/var/www/html/django/djangoblog/djangoblog/wsgi.py' cannot be loaded as Python module.


If you change to:

WSGIDaemonProcess djangoblogpython-path=/var/www/html/django/djangoblog/ \\
python-home=/var/www/html/virtualenv

gone is the 500 error instead error Time Out
by | 7 views

3 Answers

0 like 0 dislike
[Fri Feb 01 15:40:46.703393 2019] [:error] [pid 16899] [remote 192.168.1.6:0] ImportError: No module named django.core.wsgi

Not picked up Python environment - finds Django
by
0 like 0 dislike
Probably a problem with paths. See /var/www/html/django/error_log all the Python crapped out on stderr will be there.
by
0 like 0 dislike
In General, Apache is not able)
Launched on gunicorn+nginx on frontage. works fine
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
28,739 users