简体   繁体   中英

Django and Rails on Apache localhost

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)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM