environment: 1. Windows Server 2016 Datacenter 64-bit 2. SQL Server 2016 Enterprise 64-bit 3. Python 3.6.0 64-bit 4. Administrator user, no domain environment, highest authority Require: Deploy in order 1. Install the database 2. Install the database client [SSMS] 3. Install Python 4. Download apache2.4 (httpd-2.4.41-win64-VC14.zip) 5. Unzip to the root directory of drive C, open cmd and execute: C:\Apache24\bin\httpd.exe -k install 6. Download the compiled wsgi (mod_wsgi-4.5.24+ap24vc14-cp36-cp36m-win_amd64.whl) 7.cmd execution: pip install [path]\mod_wsgi-4.5.24+ap24vc14-cp36-cp36m-win_amd64.whl 8.cmd execution: mod_wsgi-express module-config (the execution result is appended to [httpd.conf]) LoadFile "d:/programs/python/python36.dll" LoadModule wsgi_module "d:/programs/python/lib/site-packages/mod_wsgi/server/mod_wsgi.cp36-win_amd64.pyd" WSGIPythonHome "d:/programs/python" 9. Modify [httpd.conf] Define SRVROOT "c:/Apache24" ServerName 【IP】:80 Include conf/extra/httpd-vhosts.conf (uncomment) 10. Modify [extra/httpd-vhosts.conf] as follows: <VirtualHost *:80> ServerName "192.168.70.111" DocumentRoot "${SRVROOT}/htdocs/MySite" ErrorLog "logs/project-error.log" CustomLog "logs/project-access.log" common </VirtualHost> Alias /media/ "${SRVROOT}/htdocs/MySite/media/" <Directory "${SRVROOT}/htdocs/MySite/media/"> Require all granted </Directory> Alias /static/ "${SRVROOT}/htdocs/MySite/static/" <Directory "${SRVROOT}/htdocs/MySite/static/"> Require all granted </Directory> WSGIScriptAlias / "${SRVROOT}/htdocs/MySite/project/wsgi.py" <Directory "${SRVROOT}/htdocs/MySite/project/"> <Files wsgi.py> Require all granted </Files> </Directory> 11. Start c:\Apache24\bin\ApacheMonitor.exe Summarize The above is the method of deploying Django on Apache that I introduced to you. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: CentOS7 uses yum to install mysql 8.0.12
>>: Native js encapsulation seamless carousel function
Table of contents 1. Let’s start with the conclus...
Whitelist rule syntax: BasicRule wl:ID [negative]...
Isolation of process address spaces is a notable ...
ClickHouse is an open source column-oriented DBMS...
Using mock.js in Vue project Development tool sel...
Jenkins configuration of user role permissions re...
Initialize Data DROP TABLE IF EXISTS `test_01`; C...
Element UI implements multiple tables scrolling a...
You can use the command: docker tag [image id] [n...
Preface The three-column layout, as the name sugg...
This article shares the specific code of Vue to i...
When using setinterval, it is found that it will ...
This article records the detailed tutorial of MyS...
1. Download 4 rpm packages mysql-community-client...
rep / egrep Syntax: grep [-cinvABC] 'word'...