iptables you can easily forward port 80 to another port (8000 in this example) so that you can run web servers as a non-root user. Requests will be forward/proxied transparently without HTTP redirects.
Note: This means any user on your machine can host something on port 80 without explicit permission.
Run these commands to forward port 80 to 8000 (change the ports as needed):
http://localhost/ will resolve to
If you need to test SSL, you can also forward port 443 to 8443:
https://localhost/ will resolve to
These settings will be lost upon reboot. On Ubuntu (and Debian), you can easily save them permanently by installing the
Upon installing, your current forwarding rules will be saved. If you want to save them again later: