Deploying Additional Applications
Deploying a second (or third, or fourth, whatever the case may be) is basically the same process as described in the guide.
However, you need to make a couple of small changes:
- Use a different domain name pointing to your server’s IP address when you run the ‘railsmachine’ command
- Edit the Apache proxy port
To edit the Apache proxy port, edit your deploy.rb after running the railsmachine command.
set :apache_default_vhost, false
set :apache_proxy_port, 8010 # or 8020, or 8030
Choosing the proxy port is based on how many apps you have running. The default is 8000, which is what your first app is probably using. Add 10 to this number for each app you have, so the second app will use 8010, third 8020, etc.
