Yakagadziriswa: shandisa django muvps

Dambudziko guru rekuisa Django pane chaiyo yakavanzika server (VPS) nderekuti inogona kunge ine zviwanikwa. Izvi zvinodaro nekuti Django inoda yakawanda ndangariro uye CPU zviwanikwa kuti imhanye nemazvo.

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>

Iyo kodhi iri kuyedza kuendesa Django chirongwa paVPS, asi iri kuwana kukanganisa. Chikanganiso ndechekuti iyo 'wsgi' application haisi kutanga nemazvo.

Chii chinonzi VPS

A VPS is virtual private server. Iyo imhando yeseva inobvumidza iwe kuti umhanye yako webhusaiti kana application.

Yakanakisa VPS yeDjango

Iko hakuna mhinduro chaiyo kumubvunzo uyu sezvo zvinoenderana nezvinodiwa chaizvo zveiyo Django chirongwa. Nekudaro, dzimwe sarudzo dzakakurumbira dzevanopa Django VPS dzinosanganisira Heroku, Amazon Web Services (AWS), uye Google Cloud Platform (GCP). Imwe neimwe ine simba rayo uye kushaya simba kwayo, saka zvakakosha kunyatso funga kuti ndeipi inonyatsokodzera imwe chirongwa.

Zvimwe zvakakosha zvekufunga nezvazvo pakusarudza mupi weDjango VPS anosanganisira:

1. Operating system: Vazhinji vanopa Django VPS vanopa maitiro akasiyana-siyana ekushanda, saka zvakakosha kusarudza imwe inoenderana nezvinodiwa zvepurojekiti yako. Semuenzaniso, GCP inopa rutsigiro rweLinux neWindows, nepo AWS ichipa ese maWindows neLinux sarudzo.

2. CPU uye ndangariro: A Django VPS inofanira kuva neCPU simba rakakwana uye ndangariro kubata zvinodiwa zvepurojekiti yako. Semuenzaniso, GCP inopa maCPU ane simba uye madziva makuru ekurangarira kupfuura AWS, nepo AWS ichipa yakaderera-powered CPUs asi yakawanda ndangariro migove.

3. Chengetedzo: Zvakakosha kusarudza mupi ane matanho akasimba ekuchengetedza. Semuyenzaniso, GCP inopa akasimba ekuchengetedza maficha akadai seakavharidzirwa dhata chengetedzo uye yechokwadi yemushandisi kuburikidza neaviri-factor authentication (2FA). AWS inopawo mamwe maficha ekuchengetedza, asi anogona kunge asina kukodzera kune ese mapurojekiti.

Related posts:

Leave a Comment