Windows Apache deployment of Django Process records

Source: Internet
Author: User

win7/apache/python2.7/django1.9 Deployment web  Environment: Windows7apache httpd-2.4.16-win64-vc14python2.7.11django1.9.7  1, install Apache1) Download related components   Steps reference http://blog.csdn.net/qq_15096707/article/details/47319545  from the official website http:// httpd.apache.org download Apachefiles for Microsoft Windows--Apache Lounge--httpd-2.4.16-win64-vc14  after the download is complete, All we have to do is unzip the file into a custom directory, find the bin directory in Apache24, open apachemonitor.exe  if ApacheMonitor.exe cannot run, prompt for missing files, such as missing Vcruntime140.dll file, install the Response VC Library, I installed vc_redist.x64 (VC2015)  2) Modify httpd.conf config file  37 line: ServerRoot "Apache Directory" (e.g. ' c:/apache24 ' to E:/apache34) serverroot "E:/apache24"  219 line: ServerName server name (e.g demo.app.com or 127.0.0.1) Remove # (you can also fill in localhost) ServerName 127.0.0.1 243 line: DocumentRoot Modify the site root address documentroot "e:/apache24/ Htdocs " 244 Line: <directory" site root address "><directory" E:/apache24/htdocs "> 360 line: ScriptAlias/ cgi-bin/"Apache directory +/cgi-bin/" scriptalias/cgi-bin/"e:/apache24/cgi-bin/"  376 line: <directory "Apache Directory +/ cgi-bin/"><directory"E:/apache24/cgi-bin" > 3) use command line cmd to install Apache service   Start command line in admin mode, then CD to Apache/bin directory to run Httpd-k install  If the restart or uninstall # Restart service httpd-k restart  #卸载服务httpd-K uninstall 4) starts and tests to start the Apache service successfully, open ApacheMonitor.exe, click Start to successfully start the service in order to test whether it is really successful, you can enter  http://localhost/  on the browser to appear "It Works"  2, Deploy Django reference http://blog.csdn.net/yingmutongxue/article/details/43985559 1) Download Mod_wsgi component download link/HTTP/ www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi选择对应python2. Version Mod_wsgi-4.4.23+ap24vc9-cp27-cp27m-win_ for 7 and 64-bit systems AMD64.WHL extract the mod_wsgi.so and put it in the Apache24/module folder   at the beginning I downloaded the wrong version of the component causing the Apache service to start at the command line, enter command httpd-w-n "apache2.4 "-K start will display an error message on the screen cannot load modules/mod_wsgi.so into server replaced with the correct version no longer error  2) modify the configuration file httpd.conf# add mod_wsgi.so module & nbsp LoadModule wsgi_module modules/mod_wsgi.so  Add # to the end of document # Specify wsgi.py profile path for MyWeb project  wsgiscriptalias/"e:/code/ wljk_workshop/wljk_workshop/wsgi.py "  #指定项目路径  wsgipythonpath" E:/code/wljk_workshop " < Directory E:/code/wljk_workshop><files Wsgi.py>require all Granted</files></directory> alias/statics E:/code/wljk_workshop/statics <directory E:/code/wljk_workshop/statics>require all granted</directory> 3) Set settings.pydebug = False   template_debug = falseallowed_hosts = [' 127.0.0.1 ', ' localhost '] 4) failed to start the server after troubleshooting the above settings. View Apache24/logs/error[thu June 18:30:54.678499] [mpm_winnt:notice] [pid 1776:tid] ah00455:apache/2.4.16 (Win6 4) mod_wsgi/4.4.23 python/2.7.11 configured--resuming normal operations[thu June 18:30:54.678499] [Mpm_winnt:noti CE] [pid 1776:tid] Ah00456:apache Lounge VC14 Server built:jul 13:24:19[thu June 18:30:54.678499] [Co Re:notice] [PID 1776:tid] Ah00094:command line: ' e:\\apache24\\bin\\httpd.exe-d e:/apache24 ' [Thu June 30 18:30:54.678 499] [Mpm_winnt:notice] [PID 1776:tid] AH00418:Parent:Created child process 5868importerror:no module named Si Te[thu June 18:30:55.068500] [mpm_winnt:crit] [PID 1776:tid] AH00419:master_main:create child process failed. exiting.  Error AH00419:master_main:create Child process failed reference http://stackoverflow.com/questions/34440078/ apache24-x86-vc9-with-mod-wsgi-says-ah00419-master-main-create-child-process/35767105  Configuration added: Wsgipythonpath "e:/code/wljk_workshop; E:/python27/lib; E:/python27/lib/site-packages; E:/python27/dlls "Wsgipythonhome" e:/python27 "  server started successfully, access site successfully. However, only local access is available at this time, and when other terminals are accessed, the error request  modified settings.pyallowed_hosts = [' * '] access succeeded  

Deploying Django Process records under Windows Apache

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.