Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I wanna test the performance of Django and Rails.

Would testing using the inbuilt web servers be a bad idea?

Is it difficult to set up making both Django and Rails run on the Apache localhost? (not the same time)

share|improve this question
you can use virtual host to point to the servers running on different ports – karthikr May 8 at 18:59
I don't need to run them at the same time, just wanna know if it's possible to run them on Apache without extremely much effort and configurations. – user1121487 May 8 at 19:04
difficulty is inversely proportional to experience of developer with platform. – akshayb May 8 at 19:04
Research is important. stackoverflow.com/questions/4619493/… – akshayb May 8 at 19:05

1 Answer

up vote 0 down vote accepted

The usual way to run rails directly in apache is by using Passenger, which tries to set it up similarly to mod_php if you've set up PHP apps to be served by apache. Or you can use apache to loadbalance dynamic requests to another backend, like thin or unicorn or others; usually apache would be set up to serve static assets directly in this situation.

Using rails' webrick server would be a bad idea, because it's notoriously slow. You'll also want to set RAILS_ENV to 'production' instead of 'development' when you start up rails, so that classes are cached and so on.

I don't know as much about setting up Django, but I would imagine you would probably do something similar to the load balancing situation described above for rails. Give the rails and django apps their own VirtualHost settings in apache, and it should work fine.

share|improve this answer
Thank you, I will look into this now. – user1121487 May 8 at 19:12

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.