Software installed: Apache2.2mod _ wsgiphp5, etc. you want to: 1. use the same port and the same domain. 2. leave all the URLs such as django_site * to django for processing. However, you have tried many configuration methods and encountered odd errors. Installed software: Apache2.2 mod_wsgi php5 and so on.
To:
1. use the same port and domain.
2. submit all the URLs such as/django_site/* to django for processing.
However, I tried many configuration methods and encountered odd errors. Reply content: Thank you for your invitation. it took a long time.
I started to touch Python/Django only after getting started with nginx, but it took a lot of time to use Apache/mod_php before. Therefore, the following Django collocation is based on the nginx fastcgi_pass idea. I am also a newbie. The goal below is to "run.
Environment:
Ubuntu 12.04 LTS, Apache 2.2.22 Prefork MPM, and mod_php are installed in apt-get.
Apache module:
- Php5
- Proxy (/etc/apache2/mod-available, proxy. load and proxy_scgi.log are displayed)
The Python module is installed using pip and the virtualenv management environment is as follows:
- Django
- Flup (Django runfcgi dependency flup)
Step: Django-> Apache/PHP-> Apache proxy_scgi/Django SCGI
1. get rid of the Django app first, and ensure that you can start and access your Django app correctly with manage. py runserver (python manage. py runserver 0.0.0.0: 8000)
2. configure the standard Apache/mod_php5 environment, which is not required in Ubuntu. Place info. php in DocumentRoot to ensure normal operation:
Configure httpd-vhosts.conf files
WSGIScriptAlias /django_site "/path/to/www/django_site.wsgi"
Order Deny,Allow Allow from all
Alias /images "/path/to/www/images" Alias /layout "/path/to/www/layout"