Is your domain public ? or just local (ie google.com vs mycompany.local)
How many public adresses do you have ?
- If 1 for both mydomain.com and server.mydomain.com, use PAT on your router, and set server.mydomain.com as CNAME of mydomain.com. But you won't be able to join server. on the port 80 if you already have a webserver at mydomain.com
- If more than 1, set server.mydomain.com as A record, with the public IP address you want to use.
Another solution would be to setup some kind of reverse proxy on your mydomain.com webserver, and if the client tries to reach server.mydomain.com, the request is forwarded to the apache/svn server.
Moreover, the proxy could handle ssl, and offload the webserver.
mydomain.com = DNS A record for your public IP address
server.mydomain.com = CNAME for mydomain.com
Forward (PAT) on your router :
<public ip>:80/tcp => to the old webserver
<public ip>:8080/tcp => to the new webserver.
server.mydomain.com = DNS A record for your secondary ip address.
And if needed, forward/open port80/tcp on the router/firewall to the webserver.
The http proxy (squid, apache...) will redirect the requests based on the domain name they've been made.
If the client asks for mydomain.com, the proxy redirects to the old webserver, 80/tcp.
If the client asks for server.mydomain.com, the proxy redirects to the new one, on 80/tcp.
This can be done I think with virtual hosts on Apache.
Hoping this helps !