在主机上安装 Django 项目时出现问题。(错误:无法启动 Web 应用程序)

问题描述 投票:0回答:0

我使用托管Beget。依靠我托管的this指令,我尝试在本地安装这个版本的Python==3.7.2 Django==3.2.13。我成功安装了 Python 和 Django。我还按照此说明配置了 .htaccess 和 passenger_wsgi.py 文件。

passenger_wsgi.py:

# -*- coding: utf-8 -*-
import os, sys
sys.path.insert(0, '/home/n/nurtugur/nurtugur.beget.tech/coolsite')
sys.path.insert(1, '/home/n/nurtugur/nurtugur.beget.tech/djangoenv/lib/python3.7/site-packages')
os.environ['DJANGO_SETTINGS_MODULE'] = 'coolsite.settings'
from django.core.wsgi import get_wsgi_application

.htaccess:

PassengerEnabled On
PassengerPython /home/n/nurtugur/nurtugur.beget.tech/djangoenv/bin/python3.7

Error that i got

我不知道为什么它不起作用。我想唯一能帮助我的是那些有使用 Beget 托管经验的人。

python django hosting
© www.soinside.com 2019 - 2024. All rights reserved.