(Disclaimer: I simply began using Linux and do not cash knowledge about setting up Apache and Python.)

I've got a rather common problem that's described in additional depth here http://code.google.com/p/modwsgi/wiki/IssuesWithExpatLibrary. Essentially, I am 99% certain my primary problem is the fact that my Apache is applying version 1.95.7 from the expat library, whereas my Python is applying version 5..one of the expat library thus, after i rely on them together I recieve a segmentation fault.

Out of the box described within the link in the very bottom from the page, I have to replace/update the version from the expat library that's utilized by Apache towards the version utilized by Python. Wouldso would I actually do this? (Bear in mind I am very unskilled with this particular kind of factor.)

EDIT: This problem continues to be resolved. Below I recorded everything Used to do to set up Apache, build Python from source code, install mod_wsgi, and resolve the dreaded expat problem for my reference and for your of other people who encounters an identical problem.

1) Installed Ubuntu with Wubi

Setting up Apache

2) On Ubuntu, downloaded Apache Unix Source httpd-2.2.21.tar.gz

3) Removed the origin in the Apache HTTPDd tarbell:

gzip -d httpd-2.2.21.tar.gz
tar xvf httpd-2.2.21.tar

4) Set up the Apache HTTPd source tree from inside removed directory:

sudo ./configure --prefix=/usr/local/apache2

5) Built the different parts which make up the Apache HTTPd package:

sudo make

6) Installed the package underneath the directory I specified by step four

sudo make install

7) Began Apache HTTP Server:

sudo /usr/local/apache2/bin/apachectl -k start

8) Checked localhost also it printed "It really works!Inch

9) Stopped Apache HTTP Server:

sudo /usr/local/apache2/bin/apachectl -k stop

Setting up Python from source code

10) Fetched all of the common packages required to build anything (e.g. the compiler etc.)

sudo apt-get install build-essential

11) Edited sources.list file in /etc/apt with the addition of the identical "n" lines included in the file towards the finish except with "n-src":

sudo nano /etc/apt/sources.list

12) Up-to-date apt-reach recognize the modification:

sudo apt-get update

13) Fetched all of the libraries required to build Python:

sudo apt-get build-dep python2.7

14) Downloaded python source code Python-2.7.2.tgz, removed it, and went the next from inside your directory:

sudo ./configure --enable-shared --prefix=/usr/local

15) Built Python:

sudo make

16) Installed Python:

sudo make install

Setting up mod_wsgi

17) Downloaded mod_wsgi source code tar ball mod_wsgi-3.3.tar.gz

18) Unpacked and set up with python from inside unpacked directory:

sudo ./configure --with-apxs=/usr/local/apache2/bin/apxs \

19) Built the set up package:

sudo make

20) Set up in Apache modules:

sudo make install

21) Downloaded Django-1.3.1.tar.gz

22) Removed file:

tar xzvf Django-1.3.1.tar.gz

23) Installed Django project from inside directory:

sudo python setup.py install

24) Edited Apache httpd.conf file:

sudo nano /usr/local/apache2/conf/httpd.conf

Added the next directive towards the finish from the file:

LoadModule wsgi_module /usr/local/apache2/modules/mod_wsgi.so
WSGIScriptAlias / /usr/local/lib/python2.7/site-packages/django/test.wsgi
<Directory /usr/local/lib/python2.7/site-packages/django>
Order deny,allow
Allow from all

25) Produced an evaluation file in django project directory:

sudo nano /usr/local/lib/python2.7/site-packages/django/test.wsgi

Added the next content towards the file:

def application(environ, start_response):
    status = '200 OK'
    output = 'Hello World!'
    response_headers = [('Content-type', 'text/plain'),
    ('Content-Length', str(len(output)))]
    start_response(status, response_headers)
    return [output]

26) Began Apache:

sudo /usr/local/apache2/bin/apachectl -k start

27) Examined localhost also it printed "Hello World!"

28) Stopped Apache:

sudo /usr/local/apache2/bin/apachectl -k stop

Testing the Dreaded Expat Problem:

29) Edited test.wsgi file:

sudo nano /usr/local/lib/python2.7/site-packages/django/test.wsgi

Added the next content to the top file:

import pyexpat

30) Began Apache:

sudo /usr/local/apache2/bin/apachectl -k start

31) It prints "Hello World!" There's a God.

32) Stopped Apache:

$ sudo /usr/local/apache2/bin/apachectl -k stop