SSH, mod_rewrite and Apache

Q At my workplace we have a server running the usual Linux, Apache and MySQL combination, acting as a development and testing server for around about 100 sites we're building or have built. The sever is only open to access from the internal network, apart from SSH access to the outside world. I now have to do some work from home but this needs to be done over a secure connection and SSH tunnelling seems like a very sensible method. The problem is that the Apache server uses mod_rewrite to route http requests to the relevant site directory, but as I'd be connecting to the server through an SSH tunnel, I can't access the server through different hostnames. Is anyone aware of a method I could use to see any of the sites without changing the server setup too drastically?

A Using SSH, you would port forward tcp/80 from the web server onto a port on the local system, such as Hosts can be maintained by modifying /etc/hosts and adding the appropriate sites and pointing them to An alternative to SSH would be to use IPSec, which would allow for the same DNS configuration. However, the firewall would have to allow IPSec tunnels to be established and the appropriate rules constructed. Applications such as Vtun and OpenVPN provide a similar capability using a user-space tool, although access to a system on the border of the network would be required.

Follow us on or Twitter

Username:   Password: