Configure Apache for Python Django

Source: Internet
Author: User

    1. First download the latest version of Apachehttp://httpd.apache.org/download.cgi#apache24, the official do not provide the installation package, download a good direct decompression to the C drive, Apache comes with the default path in the configuration file is C drive, If you install to a different disk, you need to modify the configuration file. Replace the corresponding path below.

Open C:\apache24\conf\httpd.conf with Notepad modify line 37 ServerRoot "C:/apache24" = ServerRoot "C:/apache24" ( This is where you unzip the Apache installation package )

   Modify Line 217 #ServerName www.example.com:80 = ServerName www.example.com:80

    Modified 241 Lines DocumentRoot "C:/apache24/htdocs" = DocumentRoot "C:/apache24/htdocs"

    Modified 242 lines <directory "C:/apache24/htdocs" > "<directory" > "C:/apache24/htdocs"

    Modified 358 lines scriptalias/cgi-bin/"c:/apache24/cgi-bin/" = scriptalias/cgi-bin/"c:/apache24/cgi-bin/"

    Modified 374 lines <directory "C:/apache24/cgi-bin" > "<directory" > "C:/apache24/cgi-bin"

    After double-clicking C:\apache24\bin\ApacheMonitor.exe, click Apache24 to start in the window, enter http://localhost/if it works is installed successfully.

2. Download Mod_wsgi http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi, will be extracted after the Mod_ Wsgi.so into the apache24/modules.

Open apache24/conf/httpd.conf and add LoadModule wsgi_module modules/mod_wsgi.so in the appropriate location.

Open Apachemonitor.exe,restart Apache24. If you start normally, open Apache24/logs/error.log and see Mod_wsgi:runtime using python/2.7.8. The MOD_WSGI installation was successful.

Configure Apache for Python Django

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.