以下是我运行python的虚拟主机
<VirtualHost *:8000>
DocumentRoot /var/www/VITSBACKEND
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteRule .* ws://127.0.0.1:8000%{REQUEST_URI} [P,QSA,L]
ProxyPass /ws/ ws://127.0.0.1:8000
Alias /media/ /var/www/backend/web/
<Directory /var/www/backend/web>
Require all granted
</Directory>
<Directory /var/www/backend/main>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess main python-path=/var/www/backend python-home=/var/www/backend/env
WSGIProcessGroup main
WSGIPassAuthorization On
WSGIScriptAlias / /var/www/backend/main/wsgi.py
如何在此运行 daphne 频道,我需要通过 web 服务器访问它,并且需要它仅通过 apache 运行。
有人可以在这里回答吗?