sorry for the title, but im such a newbie in server configurations. I have a problem (of course) and i will try my best to explain it to you:
- I have a vps, debian based with apache2 and in it I have two domains configured with virtualhost.
- the first domain is used to be the alias for a webserver (RUBY) and it is working with the port 8080
- second one is a website, so it is supposed to be wotking with port 80, with apache2+mysql
My problem is that the webserver needs to redirect connections from port 80 to 8080, so my ruby developer (not me, I suck in ruby) made a redirect with
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
as a conseguence my website is not working with the port 80, of course. my question: is there a way to tell to iptables to redirect the port 80 only for the connection regarding the ruby server (and so, the first domain?) I cannot change the port of the server so how do you suggest me in order to use the 80 for the website? sorry for the silly questions but I totally suck in this. I forgot to mention that im not in contact with the ruby developer anymore, so this makes the things more dramatic to me :)
thanks in advance