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
This article mainly introduces the example of imp...
Table of contents 1. Demand 2. Database Design 3....
Starting from MySQL 8.0.16, you can set a passwor...
Table of contents url module 1.parse method 2. fo...
background Today, while cooperating with other pr...
Compared with FTP, SSH-based sftp service has bet...
MySQL Introduction to MySQL MySQL was originally ...
1. <div></div> and <span></s...
What is a Port? The ports we usually refer to are...
In the MySQL database, after tables are associate...
Source of the problem: If the slave server is the...
I've been learning Kafka recently. When I was...
<iframe src=”test.jsp” width=”100″ height=”50″...
1. Project Documents 2. Use HTML and CSS for page...
Table of contents Preface 1. Download a single fi...