[Django]-Django: only blank page

7👍

Trying getting a hello world program working first and not Django. Watch:

http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations

and read:

http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide

At a guess though, are you perhaps loading mod_python into the same Apache. An incompatible mod_python will cause exactly that symptom with merely a segmentation fault message in main Apache error log.


UPDATE 1

Are you loading mod_php into same Apache? It can sometimes have conflicting shared library requirements and will cause a crash. If you are also loading it, disable it from Apache configuration.

Also try setting:

WSGIApplicationGroup %{GLOBAL}

This will force use of main interpreter which will avoid problems with third party extensions that aren’t written properly to work in sub interpreters.

You really though need to look more closely at the main Apache error log, not the virtual host one. Run a ‘tail -f’ on it when you make a request and check for sure you are seeing messages there, specifically a segmentation fault or similar message. Such a message about process crashing and causing empty page will not show in virtual host error log.

1👍

Is it possible the template file your root url/view is empty or evaluates to empty?

For instance, if you have a template like so:

{% extends "base.html" %}
{% block content %}blah blah{% endblock %}

and base.html doesn’t use a block “content”, then the content block from your template won’t be used and your template will evaluate to empty despite having content.

👤fahhem

0👍

This is from my setup (names altered to protect the innocent guilty).

<VirtualHost *:80>
        ServerName site.domain.com 
        ServerAdmin webmaster@domain.com 

        WSGIScriptAlias / /home/user/site/django.wsgi

        <Directory /home/user/site/>
                Options FollowSymLinks
                AllowOverride None 
                Order allow,deny
                allow from all
        </Directory>
         ... etc etc etc.

I think you need the <directory> to allow the server to access the .wsgi.
I’m really not an apache guru though so don’t take this example as perfect. (I think all that is needed is the order Allow, deny and allow from all)

a good site to check out: http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango

Leave a comment