0

Iam trying to install and configure apache for python 2.7 to develop a django application. wsgi module is configured. and I had did the following settings

edit httpd config file

Alias /media/ 'D:/myProjects/mysite/site_media/'

Order deny,allow Allow from all

WSGIScriptAlias / 'D:\myProjects\mysite\apache\django.wsgi'

Order deny,allow Allow from all

Create a folder apache in my site,say D:\myProjects\mysite\apache

Create wsgi script named 'django.wsgi'

import os import sys sys.path.append('D:\myProjects') os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()

Create a new folder in my site folder named 'site_media'

Copy all images,css,javascript here

Edit template with path to css & images like this

href="/media/style.css"

But when Enter 'http://127.0.0.1' in browser the browser is loading.....but not connecting to my site

when checked in error log

the error is

[Tue May 08 16:59:41 2012] [notice] Parent: child process exited with status 1 -- Restarting.

[Tue May 08 16:59:41 2012] [warn] mod_wsgi: Compiled for Python/2.7.

[Tue May 08 16:59:41 2012] [warn] mod_wsgi: Runtime using Python/2.7.3.

[Tue May 08 16:59:41 2012] [notice] Apache/2.2.21 (Win32) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations

[Tue May 08 16:59:41 2012] [notice] Server built: Sep 9 2011 10:26:10

[Tue May 08 16:59:41 2012] [notice] Parent: Created child process 2408

[Tue May 08 16:59:41 2012] [warn] mod_wsgi: Compiled for Python/2.7.

[Tue May 08 16:59:41 2012] [warn] mod_wsgi: Runtime using Python/2.7.3.

[Tue May 08 16:59:41 2012] [notice] Child 2408: Child process is running

ImportError: No module named site

Please help me ..

TomJoy
  • 233
  • 2
  • 4
  • 13

1 Answers1

0

if you are using apache2, you have to configure /etc/apache2/sites-enabled/000-default because it doesnt use httpd.config you have mentioned...

urcm
  • 2,274
  • 1
  • 19
  • 45
  • where will be the /etc/apache2/sites-enabled/000-default path..please mention i searched in apache folder and i searched in drivers in system32 but i could not find – TomJoy May 08 '12 at 12:58
  • Please help me in configuring – TomJoy May 08 '12 at 16:08
  • The 000-default is there on ubuntu/debian systems, but not on all other unices (and often not on windows). And the error of the question seems to be with some path, not with the apache config file location. – Reinout van Rees Nov 17 '12 at 20:48