Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

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


Sorry for my english

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

Your Answer

 
discard

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.