I just updated the scripts on www.lastproxy.com, both the CGI (nph-proxy) and PHP (php-proxy.php) flavors. While installing the php-proxy.php was just an upload,go, and forget, configuring the nph-proxy.cgi script on 1and1 is quite tricky. I called up the 1and1 support staff and the guy seems to be really nice, but clueless about what to do.
Well, to get nph-proxy.cgi to work on 1and1, you have to do these following
1. Upload nph-proxy.cgi as ASCII
2. Chmod the script to 755 using any FTP client (e.g. FileZilla)
3. The default #! usr/bin/perl line of the script works just fine with 1and1 so you don’t have to worry about it.
4. To actually get the script working, change the extension from .cgi to .nph
5. Point your browser to the script, bam, things just work!
For some servers, they use the prefix nph- to signify the PERL engine to not parse the header (nph stands for non-parse-header). My guess is that 1and1 server configs to use the extension .nph to notify the PERL engine instead.
I hope that this saves you some hassles getting nph-proxy.cgi to work. Last of all, check out my proxy page at http://www.lastproxy.com

Does 1and1 hosting allow proxy sites?