I have followed the WCM tutorial and everything works good except I can't get website preview to work. I am running Alfresco v2.1 on JBoss on a Windows Vista machine and have the virtual tomcat server running. It seems to be connected without any errors. I have setup the web project to deploy to localhost, as specified in the tutorial, and my alfresco-shared.properties file shows avm.remote.host=localhost (both in the virtual-tomcat directory and in the alfresco.war deployed on JBoss). There are no errors in any of the logs. When I click on the Preview Website link, it takes me to http://admin.alfrescosample2.www--sandbox.127-0-0-1.ip.alfrescodemo.net:8180/ and I get a "504 Gateway Time-Out: Unable to connect to origin Web server" http error.
One thing to note is that to get to the login screen, I have to go to http://127.0.0.1:8080/alfresco/. If I try to put "localhost" in the URL, I get a "502 Bad Gateway: DNS Host name resolution failed" http error. I'm not sure if that may be related or not. However, I'm able to ping localhost from a command prompt, and I've tried creating a new Web Project to deploy to 127.0.0.1 instead of localhost, and changed the avm.remote.host property in both alfresco-shared.properties files but that didn't seem to make any difference. Any help you could give me to resolve this would be greatly appreciated. Thanks.