sub.mydomain.com redirect to users public_html

What's the best way to create a link from username.mydomain.com to mydomain.com/~username ?

Is this an Apache thing or Named? I've looked a few times but never found anything that made any sense (I must be a laymen sub.mydomain.com redirect to users public_html ).

I have Named running on my server, Mandrake 9.1, everything else works fine, ie, going straight to mydomain.com or mydomain.com/~username, but I would like it to look a bit more professional to visitors, since I have several public websites served off this server, and mydomain.com/thewebsite/ just doesn't cut it somehow.

Also, my server/firewall is on the net, is there anyway to make, for example, xp.mydomain.com redirect to a machine on my internal network? Currently I've setup a port (on the server, iptables) to redirect to my internal network, but again, not very professional looking

internally i have 192.168.1.1 (server) and 192.168.1.2 (xp machine).

It'd be nice to try out some of the stuff .NET has to offer on the WWW without making it a dedicated server, still not keen on an MS box as a server.

And another thing (I'm none stop tonight!), in /var/www/html/blah, is there anyway to have a cgi-bin in each of them? just to save a few sites owned by Apache having to go to ../../cgi-bin/website/ for the scripts? I develop as a 'user' for each project, so paths are setup to go straight to cgi-bin. Would be nice to keep it that way when sites go Live.

Top marks to whoever answers all in one go! sub.mydomain.com redirect to users public_html

Cheers,

Rob

 

 

 

 

Top