how to set the "default domain" on port 80

6 posts / 0 new
Last post
#1 Mon, 08/01/2011 - 11:29
Morpheus

how to set the "default domain" on port 80

Hi guys, i have a problem here that i really can't solve it.. need some urgent help and it seems that other people already had the same problem

An old topic ALMOST like this one... http://www.virtualmin.com/node/9297

Well what happens is really simple in virtualmin we have many virtual servers, but one of them is special and that's the one that if you type the IP ADRESS (doesn't matter if it's the external or internal let's not make things even more complicated) we will be seeing that virtual server as the "default" for that ip adress.. the last time i installed virtualmin that would be the frist virtual server that you create it would just be that frist one, the reason is simples because it's the frist apache sees in the virtual server list.

And i know that's where i need to tweak but WHERE is that? my httpd.conf file is EMPTY! i'm on ubuntu 10.04 LTS server and i looked everywhere but that old topic just says "in your apache config-section move your default site to be the first site listed." where? couldn't he just be more specific? like frist go here, now press here, than look for this and change this, not just "change it!"

I really could use some help arround here i don't curious people typing the ip adress on their browser and see anything more that my default index that's just a ":D" and also i don't want virtualmin to decide what's gonna be the next default domain, i want that setup my way it's very important.

Mon, 08/01/2011 - 11:37
andreychek

Howdy,

You can set a default domain by logging into Virtualmin, choosing your desired domain from the drop-down on the left, then clicking Server Configuration -> Website Options, and setting "Default website for IP address" to "Yes".

Also, Ubuntu doesn't use a httpd.conf file, it's normal for it to be blank.

Many Apache options would be in the file /etc/apache2/apache2.conf.

The individual domains are located in /etc/apache2/sites-enabled.

That's the default locations for those files on Ubuntu and Debian, it's CentOS that uses an httpd.conf file, with all the configuration in one file.

-Eric

Mon, 08/01/2011 - 11:40 (Reply to #2)
Morpheus

Did i ever mentioned how much i love this guy?

THANKS ERIC :DDDDDDDDDDDD \o/

Mon, 08/01/2011 - 12:12
Locutus

FYI: Technically, what Virtualmin does in that case, is make the selected virtual server's Apache config file the (alphabetically) first, by adding some characters to its name. That's because Apache will use the first defined virtual host as "default host" if an otherwise unknown name is requested.

There can be some other caveats concerning choice of virtual host to server from. Feel free to ask (and use the forum search, we had that topic just a few days ago :) ) if you run into them.

Wed, 06/12/2019 - 09:47
ben_tvpp

Hi, ive been trying to do the same thing but 'Default website for IP address?' has Yes by it but it cant be changed. Its Just got 'Yes' as text.

Wed, 06/12/2019 - 10:31
andreychek

You would need to go into the domain you want to use as the default, and set it to "Yes".

Note that this thread is 8 years old though, if you have any additional questions, we'd encourage you to open a new thread... thanks!

-Eric