Kuxazululiwe: sebenzisa i-django ku-vps

Inkinga enkulu ngokuthumela i-Django kuseva yangasese ebonakalayo (i-VPS) ukuthi ingasebenzisa izinsiza. Lokhu kungenxa yokuthi i-Django idinga inkumbulo eningi nezinsiza ze-CPU ukuze isebenze kahle.

I have a problem with my Django project. I'm trying to deploy it on my VPS, but I can't get it to work.
This is the error that I get:
<code>    Traceback (most recent call last):
  File "/home/myuser/.local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/myuser/.local/lib/python3.6/site-packages/django/utils/deprecation.py", line 93, in __call__
    response = self.get_response(request)
  File "/home/myuser/.local/lib//python3.6//site-packages//django//core//handlers//base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/myuser/.local//python3.6//site-packages///django///core///handlers///base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  ...

  File "/usr / local / lib / python3 . 6 / site - packages / django / core / management / base . py " , line 371 , in execute     output = self . handle ( * args , ** options )   File "./manage . py" , line 72 , in handle     execute_from_command _line ( sys . argv )   File "/usr // local // lib // python3 . 6 // site - packages /// django /// core /// management /// __init__ . py " , line 363 , in execute _from _command _line utility . execute ()   File "/usr // local // lib // python3 . 6 // site - packages /// django /// core /// management /// __init__ . py " , line 355 , in execute self . fetch _command ( subcommand ). run _from _argv ( self . argv )   File "/usr // local // lib // python3 . 6 // site - packages /// django /// core /// management /** init**" , line 206 , in fetch _command klass = load _command class ( appname ) KeyError : 'demo' [ 04 : 19 : 10 web1 : 1805 ] [ WSGI ] Error getting traceback from worker process : &lt; type 'exceptions' &gt;: 'module' object has no attribute 'wsgi' [ 04 : 19 : 10 web1 : 1805 ] [ WSGI ] Traceback from worker process &lt; type 'exceptions' &gt;: 'module' object has no attribute 'wsgi' [ 04 : 19 : 10 web1 : 1805 ] [ WSGI ] Traceback from worker process &lt; type 'exceptions' &gt;: 'module' object has no attribute 'wsgi'. wsgi application 1 init failed ; not restarting ...</code>

Ikhodi izama ukufaka iphrojekthi ye-Django ku-VPS, kodwa ithola iphutha. Iphutha ukuthi uhlelo lokusebenza lwe-'wsgi' aluqalisi ngendlela efanele.

Iyini i-VPS

I-VPS iyiseva yangasese ebonakalayo. Iwuhlobo lweseva olukuvumela ukuthi usebenzise iwebhusayithi yakho noma uhlelo lokusebenza.

I-VPS engcono kakhulu ye-Django

Ayikho impendulo eqondile yalo mbuzo njengoba incike ezidingweni ezithile zephrojekthi ye-Django. Kodwa-ke, ezinye izinketho ezidumile zabahlinzeki be-Django VPS zifaka i-Heroku, i-Amazon Web Services (AWS), ne-Google Cloud Platform (GCP). Ngamunye unamandla nobuthakathaka bawo, ngakho-ke kubalulekile ukucabangela ngokucophelela ukuthi iyiphi efanelekela iphrojekthi ethile.

Ezinye izici ezibalulekile okufanele uzicabangele lapho ukhetha umhlinzeki we-Django VPS zifaka:

1. Isistimu yokusebenza: Abahlinzeki abaningi be-Django VPS banikeza uhla lwezinhlelo zokusebenza ezihlukene, ngakho-ke kubalulekile ukukhetha eyodwa efana nezidingo zephrojekthi yakho. Isibonelo, i-GCP inikeza ukusekelwa kwakho kokubili i-Linux ne-Windows, kuyilapho i-AWS inikeza kokubili izinketho ze-Windows ne-Linux.

2. I-CPU nenkumbulo: I-Django VPS kufanele ibe namandla anele e-CPU nenkumbulo ukuze isingathe izimfuno zephrojekthi yakho. Isibonelo, i-GCP inikeza ama-CPU anamandla kakhulu namachibi enkumbulo amakhulu kune-AWS, kuyilapho i-AWS inikeza ama-CPU anamandla aphansi kodwa ukwabiwa kwenkumbulo okuphana kakhulu.

3. Ukuvikeleka: Kubalulekile ukukhetha umhlinzeki onezinyathelo eziqinile zokuphepha ezisebenzayo. Isibonelo, i-GCP inikezela ngezici zokuphepha eziqinile ezifana nokugcinwa kwedatha ebethelwe kanye nokuqinisekisa komsebenzisi ngokufakazela ubuqiniso bezinto ezimbili (2FA). I-AWS iphinde inikeze izici ezithile zokuphepha, kodwa zingase zingawafaneli wonke amaphrojekthi.

Okuthunyelwe okuhlobene:

Shiya amazwana