1. Installation Configuration Apache
2. Installing the Wsgi_mod module
3. Open the appropriate port
Vim/etc/sysconfig/iptables
#Firewall configuration written by System-config-firewall#Manual Customization of this file are not recommended.*Filter: INPUT ACCEPT [0:0]:forward ACCEPT [0:0]:output ACCEPT [0:0]-A input-m state--state established,related-J ACCEPT-A input-p ICMP-J ACCEPT-A input-i lo-J ACCEPT-A input-m state--state new-m tcp-p TCP--dport 22-J ACCEPT-A input-m state--state new-m tcp-p TCP--dport 8000-j ACCEPT##注意位置-A input-m state--state new-m tcp-p TCP--dport 80-J ACCEPT-A input-j REJECT--reject-with icmp-host-prohibited-A forward-j REJECT--reject-with icmp-host-Prohibitedcommit
4. Configure the WSGI for the Django website
Vim opt/conf/httpd.conf Add code
ServerName?.?.?.? :LoadModule wsgi_module modules///root/web-project/deviceweb/deviceweb//root/ web-project/deviceweb//root/web-project/deviceweb><files wsgi.py>Order deny, Allowallow from all</files></directory>/static//root/web-project/deviceweb/ static//root/web-project/deviceweb/static> Options indexes followsymlinks allowoverride None Order deny,allow allow from all</directory>
The Django Web deployment on Apache