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


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.

Sultanos's picture

I am in the opposite situation i am trying to get both adress to respond at the same webroot , but as i get redirect to www.local.com i see the index that is at var/www/ not like local.com that shows var/www/local 

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.

Dee's picture

I tried to setup another SSL service on another port on LAMP directed to /usr/share/servicename and i have no result. I did opened that port on firewall. I tried to set up everything as phpmyadmin.

Behavior of the port is different than on other ports, refuses connection immediatelly. When I try telnet:

telnet (xxIPaddr) 10443
Trying (xxIPaddr)...
telnet: Unable to connect to remote host: Connection refused

Do I miss something? Any hint?

Dee's picture

UPS, it is just very simple solution what i have found: I have to alow listening of the apache on that port in Global configuration - Networking and Addresses. Then it works. New to apache conf - 2 hours of elaboration, grrr...

Add new comment