Hello-

I have succesfully installed LAMP (new user) and created a name based virtual server. Our webmaster has uploaded to that site's folder and its working well- his website is publically viewable. But when I created a second virtual server in the identical way (but with a different name and of course different folder and document root) any public requests for the second name go to the first server folder, not to the second! I have tried to find documentation on what I may be missing but there seems to be very little on this subject for Webmin, only for Apache in general. Any help will be greatly appreciated. Thank you

Forum: 

Fixed it myself- didn't put www in front of the server names in the virtual server configuration- after I did that it worked. Apparently requests to the first virtual server worked OK, but all other requests went to the first VS. Now all requests go to correct VS. At least I hope this helps someone else who may have had the same problem!

Jeremy Davis's picture

Thanks for posting back. I'm sure it will help others.

Jeremy Davis's picture

To serve both (and only) domain.com and www.domain.com you would leave the server config as default and use DNS to redirect one to the other.

I would create a DNS A record pointing to domain.com with a CName record for www.domain.com pointing to the same server. With default TKL Apache config that should just work.

Add new comment