我想主机django应用程序使用apache2与mod_wsgi没有虚拟环境,所以我不能配置.conf
文件这里是我的配置文件。
<VirtualHost *:80>
ServerName example.in
ServerAdmin info@example.in
ServerAlias example.in
DocumentRoot /home/MyMedbookMain/django
Alias /static /home/MyMedbookMain/django/static
<Directory /home/TransportDemo/static>
Require all granted
</Directory>
<Directory /home/MyMedbookMain/django/qm>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess mymedbook python-home=/usr/local/bin/pip3 python-path=/home/MyMedbookMain/django
WSGIProcessGroup mymedbook
WSGIScriptAlias / /home/MyMedbookMain/django/qm/wsgi.py
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
重新加载apache2后,未加载
1条答案
按热度按时间gajydyqb1#
嗨,你能告诉我你得到了什么错误吗?我建议使用虚拟环境,因为它会给予你更好地了解你的要求,如果你需要它是如何使用虚拟环境下面是答案
请分享你从apache得到的错误.