I try to figure out how to point a.b.c.d:3000 to my domain name. Here, a.b.c.d is my IP address.
As per this post:
I get the impression that I need to set Webrick to host on port 80, since that is the default assumed port, hence I can map a.b.c.d to my domain name and mydomain.org will reach my site.
Is this a correct assumption or am I going about this the wrong way?
Anyway, I can't get Webrick to use port 80, I get the following error:
WARN TCPServer Error: Permission denied - bind(2)
Checking for listeners on port 80:
$ netstat -tlnp (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:8089 0.0.0.0:* LISTEN 3266/banshee tcp6 0 0 ::1:631 :::* LISTEN -
No other processes using port 80.
From other posts, I get the impression that mapping to ports below 1024 is not possible.
Running the following command:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
Now, setting Webrick on port 8080, I still can't reach my site from a.b.c.d! (nor a.b.c.d:80)
This situation shouldn't be such an uncommon one, what am I missing? If it matters, I use the standard Rails 4 development environment of Webrick, because I only expect like 100 page views/months.