简体   繁体   中英

Setting a Python path in Windows XAMPP using mod_wsgi

I'm trying to use Python2.6 in combination with XAMPP1.7.3. But when I try to run my Apache server, it won't start. I went to my log files in and it told me this:

" httpd.exe: Syntax error on line 133 of C:/xampp/apache/conf/httpd.conf: Cannot load C:/xampp/apache/modules/mod_wsgi.so into server: The specified module could not be found. "

It looks like Apache can't find the mod_wsgi.so file.

I have the XAMPP1.7.3 (32bit) and Python2.6 (32bit) version installed on my computer (Windows7 64 bit). I already checked if I could use this versions and normally it shouldn't give a problem.

This are the things I did:

  1. I downloaded and installed XAMPP1.7.3 (32bit version)

  2. I downloaded and installed Python2.6 (32bit version)

  3. I tested the apache server on XAMPP and it worked, after that I shutted down XAMPP and rebooted my computer.

  4. I downloaded the mod_wsgi file specifically for the combination of Apache2.2 and Python2.6

  5. I putted the mod_wsgi file in C:\\Xamp\\Apache\\modules

  6. I added to following line to C:\\xampp\\apache\\conf\\httpd.conf

    • LoadModule wsgi_module modules/mod_wsgi.so
  7. I tried to start Apache but it failed...

All suggestions welcome!

download path mod_wsgi: https://code.google.com/p/modwsgi/wiki/DownloadTheSoftware?tm=2

Double check that in the directory C:/xampp/apache/modules there exists a mod_wsgi.so and that there are no hidden extra extensions. If if it okay, then the error can mean you are missing DLLs required by mod_wsgi.

For the DLLs you need to have made sure you installed Python for all users and not just the user you installed it as. In worst case you may be missing compiler SDK libraries for compiler version used to build mod_wsgi.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM