These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for What is the default server? on the new forum.
Hi all I just installed VirtualMin (free) on a CentOS 5.5 Vps.
I created 3 virtual servers associated to 3 domains: - myacquarium.com (home/myacquarium/public_html) - mygarden.com (home/mygarden/public_html) - myhouse.com (home/myhouse/public_html)
My IP is 123.123.123.123.
Everything works fine when I use domain name (myacquarium.com, mygarden.com and myhouse.com).
The problem is that I need access to http://123.123.123.123 (/var/www/html). In this case, I'm addressed to myacquarium.com
How is possible to use http://123.123.123.123 directly, without any domain attached? and use it as default server?
Thank you.
Anytime Apache receives a request for a domain or IP that it has no VirtualHost block for, it will serve the default VirtualHost.
To set the default VirtualHost, you can go into Server Configuration -> Website Options, and set "Default website for this IP".
-Eric
Hi Eric
default VistualHost is simply alphabetically the first in my virtual host list or what? I've no created any default VirtualHost.
Can I set "no virtual host" to the IP? I simply need to have http://123.123.123.123 available without any host or domain attached.
Please, note that Webmin->Servers->Apache Webserver say that Default Server is addressed to /var/www/html, but unfortunately I'm not currently able to reach /var/www/html contents...
Well, my recommendation would be to setup a new Virtual Server to handle the website for that IP address.
One option is that when prompted for the domain name for the Virtual Server, just enter that IP address.
-Eric
I can try this solution, Eric, but I think that VirtualMin will try to create /home/123.123.123.123/public_html directory!
Have you an idea about why Apache default server (/var/www/html) does not works?
Please see attachment to well understand my question!
During setup, Apache was configured to no longer use /var/www for websites. So, with some tweaking, it could be made to work -- but that's the long and hard route :-)
Also, suexec only works under /home, so trying to use /var/www would limit your options.
When you create that new Virtual Server, it will indeed create /home/123.123.123.123/public_html.
My suggestion is to just put your desired website there.
If you don't like having a directory named "123.123.123.123", you can always change the username used when creating the Virtual Server.
-Eric
Eric,
I just tried and VirtualMin created /home/123/public_html
However, I suspect that this solution can affect the VirtualMin behavior too (actually it is reached using 123.123.123.123:10000).
You are absolutely right about suexec, I simply forgot this :-(
Thank you Eric, talking with you was absolutely instructive!
Cheers, and thank you again
Carlo
Howdy,
Oh, I meant to answer this question that you asked earlier --
default VistualHost is simply alphabetically the first in my virtual host list or what? I've no created any default VirtualHost.
The default VirtualHost is the first VirtualHost that Apache sees. On Ubuntu/Debian, the default is generally alphabetical. On CentOS, the default is just the first one that was ever created.
But in either case, you can change that default in the Website Options.
However, I suspect that this solution can affect the VirtualMin behavior too (actually it is reached using 123.123.123.123:10000).
Webmin/Virtualmin running on port 10000 wouldn't actually be affected by any of your settings in Apache... Webmin provides it's own internal web server, it doesn't use Apache.
You should be able to reach Webmin by going to port 10000 on any domain that resolves to your IP address.
Does that answer all the questions you had?
-Eric
Yes, Eric. that answered to all my questions!
Thank you very much for your kindness :-)
Cheers,
Carlo