Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently working on a development project where I need to run four different PHP programs (both with MySQL backends) and one Django project.

Current Plan:

  • XenForo (forums.domain.com) [PHP Forum]
  • OSQA (qa.domain.com) [Django/Python QA Site]
  • PHPFox (social.domain.com) [PHP Social Network]
  • BugTrackr (bugs.domain.com) [PHP Bug Tracker, custom made]
  • Wordpress (www.domain.com) [PHP CMS]

How would this be possible so that they could all coexist on the same Apache, play nice with each other, and not crash the system every n hours?

share|improve this question
up vote 2 down vote accepted

For django, I think you need to use mod_proxy in Apache and create a VirtualHost.

<VirtualHost *:80>
     ServerName qa.domain.com
     ProxyPreserveHost on
     ProxyPass / http://localhost:DJANGO_PORT_HERE/

Don't forget to uncomment the mod_proxy/mod_proxy_http in httpd.conf

For the other applications, just create a simple VirtualHost too.

The django documentation recommend you use the mod_wsgi, adding this in your httpd.conf:

WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py
WSGIPythonPath /path/to/mysite.com

<Directory /path/to/mysite.com/mysite>
<Files wsgi.py>
Require all granted


share|improve this answer
Thank you. As of now, I cannot test this method, but I hopefully will soon. – Kaz Wolfe May 4 '14 at 0:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.