1

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?

2

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/
</VirtualHost>

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
</Files>
</Directory>

https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/modwsgi/


  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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