Search code examples
pythondjangopassengerhost

Could not spawn process for application deploying Django on Cpanel


I'm never done development in a career as a software programmer I'm given this domain name on NameCheap with the server disk. Now I design Django app and trying to deploy on the server but I had problems (stated below)

[ E 2019-03-19 06:23:19.7356 598863/T2n age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /home/username/IOT: The application process exited prematurely.
App 644163 output:   File "/home/username/IOT/passenger_wsgi.py", line 1, in <module>
App 644163 output:   File "/home/username/virtualenv/IOT/3.7/lib64/python3.7/imp.py", line 171, in load_source

edited: Read more about the software supporting the WSGI is using Phusion Passenger, you could read more here; www.phusionpassenger.com

this is my passenger_wsgi.py:

from myproject.wsgi import application

I had tried several tutorials:

  1. https://www.youtube.com/watch?v=ffqMZ5IcmSY&ab_channel=iFastNetLtd.InternetServices

  2. https://smartlazycoding.com/django-tutorial/deploy-a-django-website-to-a2-hosting

  3. https://hostpresto.com/community/tutorials/how-to-setup-a-python-django-website-on-hostpresto/

  4. https://www.helloworldhost.com/knowledgebase/9/Deploy-Django-App-on-cPanel-HelloWorldHost.html

  5. https://www.helloworldhost.com/knowledgebase/9/Deploy-Django-App-on-cPanel-HelloWorldHost.html

  6. how to install django on cpanel

Very much applicate if you could help


Solution

  • The answer very simple, my server is using a programme name passenger, the official website for more information: https://www.phusionpassenger.com/

    Now error very simply; passenger can't find my application, All I did was move my project and app folder on the same layer passenger_wsgi.py and it works like charm.