TurnKey Linux Virtual Appliance Library

create mulitple virtual servers through Webmin

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

solved

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's picture

Excellent

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

What if you want both adresss www.local.com and local.com

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's picture

Generally that is done at the DNS level

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.

Similar :port based issue

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?

Solved it by myself

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...

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)