Hello!
I am setting up Virtualmin Pro these days (really impressive), and have come across this problem:
the web site that will show up for domains that point to the server, but have no virtual servers configured in apache, is always the latest virtual that has been added.
so for example, the hostname of my server, which does not have any web site, will show the website of the latest domain i added to virtualmin hosting.
hopefully you understand what i mean.
i want that the default apache website be always a specific one, where i can show something like "domain not active on this server" or stuff like that.
how can i achieve this?
thanks
by default the IP shows the toplisted virtual domain. At least this was/is so on my server. centos 5.1 VM Pro 3.57
In the - Apache webserver module - global configuration - edit config files - find these lines
VirtualHost example:
Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
server name.
#<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /www/docs/dummy-host.example.com
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
Make sure the dummy server/domein exists and put it on top of the list.<br><br>Post edited by: ronald, at: 2008/05/24 03:18
hmmm i have no such lines.
anyway, if i look at "existing virtual hosts", i can see two entries at the top:
Default Server Any Any Automatic Automatic
Virtual Server Any Any Automatic /var/www/
But somehow they don’t seem to work…
Debian 4.0 here.
i seem to have a dummy configuration and it is the very first in the list, but instead, the second virtual in the list is used as default hosting.
so there must be some error in the default virtual config i guess…
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
Any clue?
I’m still in the process of migrating my domain and find this issue really annoying, I want to fix this
hal
what I did actually was to manually edit the apache config and placed my main domain at the top of the <virtualhost> list.
If any existing domain has a wrong in it then my main domain will show up (in my case it is a hosting promotional domain
since you are on debian I can’t share my experience as I run on CentOS, however per haps the http://www.virtualmin.com/documentation/id,troubleshooting_common_problems/ can help a little. There is a section about wrong sites showing up when scrolling down.
Thanks! That did the trick!
I changed
to
and also created a virtualhost for port 443
hal