I have a dedicated machine I use for testing. At the moment it’s running a Rails (2.3) app over Apache and Passenger. I would also like to simultaneously serve a Flask application using the same machine and a different url if possible. Here’s what I currently have for my httpd.conf file:
<VirtualHost *:80>
DocumentRoot /path/to/rails-app/public
PassengerDefaultUser railsuser
RailsEnv testing
# .. some misc apache config
</VirtualHost>
How should I modify it to serve two different urls (on a local network) with one serving the Rails app and the other serving Flask? Thanks.
In your OP, you’re setting the handling for the default url.
For your second virtual web server, just use a specific host name in the config that is a second host name for the same machine. This is called “name-based” virtual hosting. See wikipedia.
Remember that multiple hostnames can resolve to the same IP address.
You can use the full dns system if you want, just specify your local network address (192.168.xxx) — the url will not work for machines not on your local network.
More info will be available at the webmasters SO site.
A post with instructions