1. To have a specific virtual host respond to multiple names, use the ServerAlias directive after the ServerName directive. For example:
Code:
ServerName yourdomain.tld
ServerAlias www.yourdomain.tld
ServerAlias dev.yourdomain.tld
ServerAlias anotherdomain.tld
It seems you can only use hostnames for the values. If can only access the server from the lan, a work-around would be to add the domains/sub-domains to /etc/hosts on your workstation pointing to the LAN IP of your server. Assuming your server is at 192.168.0.23:
Code:
192.168.0.23 domain.com
192.168.0.23 www.domain.com
192.168.0.23 ftp.domain.com
192.168.0.23 svn.domain.com
192.168.0.23 etc.domain.com
This will bypass external DNS lookups for these domains and automatically resolve them to the IP you specify. Apache should then see the request being for svn.domain.com, rather than 192.168.0.23.
2. I'm assuming that you have an svn, ftp and other services running on the same IP as your apache server. Unless you have web apps to interface these services, you don't want apache answering those requests.
Per your example, ftp.domain.com will resolve to your IP address. The only thing that differentiates this from an http request is the port number. Apache only listens on port 80 (by default). FTP clients will send the request to port 21, which will go to your ftp server automatically.
However, if you need apache to answer these requests, you need to do
port based virtual hosts.
Bookmarks