Answer the question
In order to leave comments, you need to log in
How to publish a django project using Apache on CentOS 7?
Wrote a simple django blog, learning django. Now I can't post it. The project wrote metanit.com
with this manual ,
that is, first,
then
I have a server on CentOS 7, Nginx is on the front as a proxy, on the Apach backend, I have different projects on php
I wanted to publish a django project next to it, but I get an error 500.django-admin startproject djangoblog
python manage.py startapp myblog
<VirtualHost *:8080>
ServerName test.mydomian.ru
ErrorLog "/var/www/html/django/error_log" #логи временно сюда
CustomLog "/var/www/html/django/access_log" combined
Alias /static /var/www/html/django/djangoblog
<Directory /var/www/html/django/djangoblog/static>
Require all granted
</Directory>
<Directory /var/www/html/django/djangoblog/djangoblog>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
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
</VirtualHost>
[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.
WSGIDaemonProcess djangoblogpython-path=/var/www/html/django/djangoblog/\
python-home=/var/www/html/virtualenv
Answer the question
In order to leave comments, you need to log in
[Fri Feb 01 15:40:46.703393 2019] [:error] [pid 16899] [remote 192.168.1.6:0] ImportError: No module named django.core.wsgi
Probably a problem with the paths. See /var/www/html/django/error_log and whatever Python sends to stderr will be there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question