Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Linux environment to configure Apache + Django + wsgi     - Several reasons MySQL garbled (Database)

- Linux Getting Started tutorial: Experience QEMU virtual machine articles (Linux)

- Linux basis: a comprehensive study pwd command (Linux)

- Will Laravel become the most successful PHP framework? (Programming)

- Linux filtration empty file command summary (Linux)

- High-performance JavaScript loaded and executed (Programming)

- Yii2 Advanced Version Copy New Project Problem Solved (Programming)

- CentOS 6.4 install and configure Squid Proxy Server (Linux)

- Depth Java Singleton (Programming)

- Linux system - The understanding cpu load (Linux)

- Revive Adserver ad server installation on Ubuntu 15.04 / CentOS7 (Server)

- Linux RPM default installation path (Linux)

- To setup CentOS LAMP environment (Server)

- How to generate Linux, random password encryption or decryption (Linux)

- Python interview must look at 15 questions (Programming)

- Spring declarative transaction management (Programming)

- Practical Handbook: 130+ improve the efficiency of commonly used commands Vim (Linux)

- Modify Linux SSH default port 22 in several ways (Linux)

- Linux screen commonly commands (Linux)

- Make command tutorial (Linux)

 
         
  Linux environment to configure Apache + Django + wsgi
     
  Add Date : 2018-11-21      
         
         
         
  In the Django development environment, we simply by "python manage.py runserver 0.0.0.0:8000" you can start with a simple HTTP server for Django developers. When the completion of the project development release, this simple application server can not meet demand. This program is a good time to Django applications into Apache.

Django has done a lot of work for us, it will be integrated into Django Apache is a very simple thing. Django integrated into the Apache There are two ways: python_mod and wsgi, the latter relative to the former is more stable, so here we wsgi approach to integration.
First introduce my environment:

0.CentOS X64

1.Apache 2.2.3

2.Django 1.6.1

Integration Step 1: Install mod_wsgi

yum insall python26-mod_wsgi.x86_64

After installation is complete, check the Apache directory /etc/httpd/conf.d/ occur python26-mod_wsgi.conf, inside has been good for us is automatically loading mod_wsgi.so configurations:

################################################## ###############################
# Do not enable mod_python and mod_wsgi in the same apache process.
################################################## ###############################
#

# NOTE: By default python26-mod_python with not load if mod_wsgi is installed
# And enabled. Only load if mod_python and mod_wsgi are not already loaded.