Virtualmin Server address not going correct place

Hi all,

I have my virtualmin server at fshlampserver.local

Before i created the first Virtual Server (manuscript.local) typing http://fshlampserver.local into a browser from a different machine on the lan correctly rendered the index.html page located at /var/www/index.html

After creating the VS manuscript.local when I type fshlampserver.local it renders the the index.html page located at /home/manuscript/public_html/index.html

Which is not exactly what I want. I suspect Virtualmin is set up by default with apache to do name-based hosting. So if a name cannot be found it should display the first virtual host listed.

Below is how virtualmin has configured apache

NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/
&lt;Directory /&gt;
	Options FollowSymLinks
	AllowOverride None
&lt;Directory /var/www/&gt;
	Options Indexes FollowSymLinks MultiViews
	AllowOverride None
	Order allow,deny
	allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
&lt;Directory &quot;/usr/lib/cgi-bin&quot;&gt;
	AllowOverride None
	Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all

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/ &quot;/usr/share/doc/&quot;
&lt;Directory &quot;/usr/share/doc/&quot;&gt;
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from ::1/128

SuexecUserGroup "#1001" "#1002"
ServerName manuscript.local
ServerAlias www.manuscript.local
ServerAlias webmail.manuscript.local
ServerAlias admin.manuscript.local
DocumentRoot /home/manuscript/public_html
ErrorLog /var/log/virtualmin/manuscript.local_error_log
CustomLog /var/log/virtualmin/manuscript.local_access_log combined
ScriptAlias /cgi-bin/ /home/manuscript/cgi-bin/
ScriptAlias /awstats /home/manuscript/cgi-bin
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/manuscript/public_html>
Options -Indexes IncludesNOEXEC FollowSymLinks
allow from all
AllowOverride All
<Directory /home/manuscript/cgi-bin>
allow from all
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.manuscript.local
RewriteRule ^(.) https://manuscript.local:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.manuscript.local
RewriteRule ^(.
) https://manuscript.local:10000/ [R]
Alias /dav /home/manuscript/public_html
<Location /dav>
AuthType Basic
AuthName manuscript.local
AuthUserFile /home/manuscript/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
AuthName "manuscript.local statistics"
AuthType Basic
AuthUserFile /home/manuscript/.awstats-htpasswd
require valid-user

If i type in fshlampserver.local or I want it to render the page in /var/www which is the first virtual server definition … but it’s not doing that for some reason.

If I manually remove NameVirtualHost *
and in the first Virtualhost definition change
<VirtualHost *> to <VirtualHost> only then do I get the behaviour i would like.

But my problem is if I edit this configuration manually will it in anyway confound virtualmin when it comes to configuring apache thru the virtualmin interface. Or can I safely make the manual edit.

Also does the change actually make any sense.


Your manual change is correct.

Having the "NameVirtualHost *" setting in there will just cause problems, and getting rid of it now is the right thing to do :slight_smile: