Starting the FastCGI process manager

The process of beginning to build a website with the Django framework is as simple as running the following command:

[[email protected] ~]# django-admin startproject mysite

Once that part is done, you will find a manage.py Python script that comes with the default project template. Open the newly created mysite directory containing manage.py, and run the following command:

[[email protected] mysite]# python manage.py runfcgi method=prefork host=127.0.0.1 port=9000 pidfile=/var/run/django.pid

If everything was correctly configured, and the dependencies are properly installed, running this command should produce no output, which is often a good sign. The FastCGI process manager is now running in the background waiting for connections. You can verify that the application is running with the ps command (for example, by executing ps aux | grep python). If you don't see any running process, try changing the previous command slightly by selecting a different port. All we need to do now is to set up the virtual host in the Nginx configuration file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.201.5