1

I am trying to run ssl module on Apache where is running my Django application. For running Django on Apache2 I use wsgi(mod_wsgi.so module). Everything is good when the following line in httpd.conf is commented:

LoadModule ssl_module modules/mod_ssl.so

I can access both urls: http://mydomain:8080 and http://mydomain:8080/mysite But if only I uncomment line with loading ssl module I can't access url http://mydomain:8080/mysite There is an error:

Internal Server Error.

The server encountered an internal error or misconfiguration and was unable to complete your request.

And there is a message in error.log:

[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1] mod_wsgi (pid=932): Exception occurred processing WSGI script 'D:/Workspace/Python/wsgi_scripts/rfx.wsgi'.
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1] Traceback (most recent call last):
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\wsgi.py", line 250, in __call__
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1]     self.load_middleware()
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\base.py", line 39, in load_middleware
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1]     for middleware_path in settings.MIDDLEWARE_CLASSES:
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django\\utils\\functional.py", line 276, in __getattr__
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1]     self._setup()
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django\\conf\\__init__.py", line 42, in _setup
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1]     self._wrapped = Settings(settings_module)
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\django\\conf\\__init__.py", line 89, in __init__
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1]     raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
[Fri Mar 23 20:00:54 2012] [error] [client 127.0.0.1] ImportError: Could not import settings 'settings' (Is it on sys.path?): DLL load failed: The specified procedure could not be found.

I have had this error before, but I don't know why mod_ssl.so influence on this. But I still can access http://mydomain:8080 and https://mydomain.

sunprophit
  • 1,639
  • 4
  • 16
  • 39

0 Answers0