After installing Django 1.7.7 got 500 internal error

Installing Django 1.7.7 successfully and then tried to access mydomain.com/admin got to a 500 error page.

Apache error log shows:

[Thu Feb 18 22:55:14.274490 2016] [core:error] [pid 31858] [client 189.999.999.999:63148] End of script output before headers: django.fcgi [Thu Feb 18 22:55:16.522874 2016] [fcgid:warn] [pid 31861] (104)Connection reset by peer: [client 189.999.999.999:63152] mod_fcgid: error reading data from FastCGI server [Thu Feb 18 22:55:16.522963 2016] [core:error] [pid 31861] [client 189.999.999.999:63152] End of script output before headers: django.fcgi

It may not be related to the issue but Install script has Django 1.7.7 and its support ended last December. Django 1.8 is a LTS and newest version is 1.9.2 as you can see in below link:

https://www.djangoproject.com/download/

Status: 
Closed (fixed)

Comments

Howdy -- could you try changing the PHP Execution Mode to "CGI" (in Server Configuration -> Website Options), and then access Django again and see what errors show up in the logs?

CGI can produce better errors, and I'm wondering if we'll see a different error message at that point.

Here is the log after changing to PHP Execution mode to CGI and restarting apache:

[Sat Feb 20 16:10:38.597840 2016] [autoindex:error] [pid 23297] [client 180.76.15.145:37780] AH01276: Cannot serve directory /home/mydomain/public_html/: No matching DirectoryIndex (index.html,index.htm,index.php,index.php4,index.php5) found, and server-generated directory index forbidden by Options directive [Sat Feb 20 16:41:17.800429 2016] [fcgid:warn] [pid 14655] (104)Connection reset by peer: [client 189.xxx.xxx.xxx:60459] mod_fcgid: error reading data from FastCGI server [Sat Feb 20 16:41:17.800507 2016] [core:error] [pid 14655] [client 189.xxx.xxx.xxx:60459] End of script output before headers: django.fcgi [Sat Feb 20 16:41:19.675251 2016] [fcgid:warn] [pid 14651] (104)Connection reset by peer: [client 189.xxx.xxx.xxx:60463] mod_fcgid: error reading data from FastCGI server [Sat Feb 20 16:41:19.675329 2016] [core:error] [pid 14651] [client 189.xxx.xxx.xxx:60463] End of script output before headers: django.fcgi [Sat Feb 20 16:41:20.436064 2016] [fcgid:warn] [pid 14653] (104)Connection reset by peer: [client 189.xxx.xxx.xxx:60464] mod_fcgid: error reading data from FastCGI server [Sat Feb 20 16:41:20.436143 2016] [core:error] [pid 14653] [client 189.xxx.xxx.xxx:60464] End of script output before headers: django.fcgi

FYI, since Django is written in Python, the PHP execution mode has no effect.

jorgecardenas1 - which python version and Linux distribution and version are you running there?

Python version 2.7.5 is running I guess come with latest CentOS 7

Ok, if you go to System Settings -> Script Installers -> Installer Updates and click Save, you should get a new version of the Django installer for Virtualmin that fixes this issue.

Status: Active ยป Fixed

Django version 1.9.2 was installed successfully but I noticed it deleted a Prestashop demo store that was installed manually on public_html/tienda/ so I wanted to uninstall Django and got this error and was not able to uninstall it:

Now un-installing Django version 1.9.2 .. Failed to un-install scripts : fuser command is not installed

After checking with Filemin public_html was empty except by roundcube that was installed with script install but the database was not deleted. Deleting manually the database did not allow me to uninstall Django 1.9.2 got same error message as above.

Can you try running this command:

yum install psmisc

After that, are you able to uninstall Django?

After yum install psmisc I was able to uninstall django using the script installer.

FYI, we will add a check to ensure that fuser is installed in future.