In order for this to work, virtualization-domain and all its subdomains must resolve in DNS to the IP address of the Virtualization Server. This is sometimes known as a 'wildcard DNS' address mapping. There are two ways to achieve this:
Use the appropriate subdomain of ip.alfrescodemo.net (see instructions below)
Configure a nameserver, and set up a wildcard domain pointing at your Virtualization Server machine's IP address.
While the second method will let you use your Virtualization Server even when disconnected from the Internet, many people will find the first method easier.
Method 1: Using ip.alfrescodemo.net
Let's denote the directory you've installed the virtualization server in as
Further, let's suppose the IP address of the machine hosting the virtualization server is:
Alfresco has set up a nameserver at ip.alfrescodemo.net that's able to resolve any domain name of the form:
(or any of its subdomains) as the IP address:
For example, if your browser asks for the virtual host name:
Thus, ip.alfrescodemo.net provides 'wildcard dns' for all valid IPV4 address. By default, the Virtualization Server is configured to use the virtualization domain:
This returns the IP address:
This special IP address always refers to your local machine (hence its name: 'localhost'). Therefore, if you use the default virtualization domain '127-0-0-1.ip.alfrescodemo.net', you'll only be able to do in-context preview on the same machine that hosts the Virtualization Server. To enable everybody on a LAN to use in-context preview, you'll need to use a network-accessible IP address (i.e.: not 127.0.0.1). In order to make the Alfresco webapp generate URLs that address the Virtualization Server's network-accessible address (e.g.: 192.168.1.5), edit the file:
When specifying alfresco.virtserver.domain that uses ip.alfrescodemo.net, be sure IP address you want to have a DNS wildcard domain for is hyphen-encoded. If it isn't, ip.alfrescodemo.net will assume you've misconfigured your system, and will fall back to returning 127.0.0.1 for all DNS name lookups within your malformed virtualization domain. For example:
THIS IS VALID: alfresco.virtserver.domain=192-168-1-5.ip.alfrescodemo.net THIS IS MALFORMED: alfresco.virtserver.domain=192.168.1.5.ip.alfrescodemo.net
Once you restart the Tomcat instance that runs the Alfresco webapp, if you click on the 'eyeball' icon near WCM assets, you'll see URLs of the form:
and modify the value of the alfresco.virtserver.domain property so it looks like this:
The 'hosts' file cannot be used to create a wildcard DNS domain on Windows or Unix. To create a DNS wildcard that's usable when you're not connected to the Internet, you must install, configure, and maintain a real nameserver. Thus, it's a tradeoff: using ip.alfrescodemo.net for wildcard DNS is easy, fast, free, and requires no ongoing support effort; local nameserver require expertise and support, but may offer features you actually need (e.g.: the ability to run on a disconnected laptop).
The choice is yours.
A word of caution
Setting up DNS properly requires a fair amount of specialized expertise, and a great deal of attention to seemingly minor details. If you make a mistake, your network's security may be compromised in several ways: cache poisoning, network snooping, viruses, denial of service attacks, etc. Even when set up correctly, most DNS servers require at least some 'care and feeding', and some ongoing attention to security bulletins; while djbdns quite good in this regard, the most common servers (Microsoft DNS and BIND) are notoriously buggy http://www.google.com/search?hl=en&safe=off&q=Microsoft+DN...http://www.google.com/search?hl=en&safe=off&q=BIND+bugs&bt.... Be careful.