I'm hosting two applications on my web server, one is a Drupal site, and the other is an Errbit installation, which is a Ruby on Rails application. The URLs looks something like this:
I want to drop the need for :3000 on the second URL, so we can access it directly via:
I don't want to redirect, I want the URL to remain, without the port number. I've previously used the following command line commands to set some IP table reconfiguration:
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000 sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 3000
...which worked fine, as there was no Apache running on the old server. However, this will cause ALL requests on port 80 to be redirected to port 3000, meaning it will break access to http://ourcompany.com
How do I set this up?
Is there a way to configure the IP tables to allow this, or would this be done in the Apache2 configuration?