ALIAS AND APACHE PROBLEMS...

Goodmorning everybody…
I’ve just installed virtualmin GPL for the first time and it seems fantastic…but I’ve just a couple of important problems…!!

  1. I don’t understand…the default directory for website files for a virtual server (lets say for example that the domain is sardegnanuova.com is /home/sardegnanuova/public_html??? Is this correct?
    If it is I can’t understand why when, just to try, I upload a file as index.html it doesn’t change anything, and, going from the web (www.sardegnanuova.com) it returns always the same message (Index of /
    Name Last modified Size Description
    Apache/2.2.3 (CentOS) Server at www.sardegnanuova.com Port 80)…
    More than this when I try to access to ftp (ftp://www.sardegnanuova.com) I go in a completely different directory (I don’t know witch directory it is…:P) containing folders “.spamassasin” “.usermin” “Maildir”…of course there’s no public_html… HEELP!!!
  2. Other problem is the configuration of aliases in Apache…I would like that webmail.sardegnanuova.com redirect me on “http://sardegnanuova.com:20000” but it doesn’t…Same for other aliases…I attach you the part of the content of httpd.conf (that I haven’t modified manually) about virtual server sardegnanuova.com:

<VirtualHost 192.168.0.81:80>
SuexecUserGroup "#501" "#502"
ServerName sardegnanuova.com
ServerAlias www.sardegnanuova.com
ServerAlias webmail.sardegnanuova.com
ServerAlias admin.sardegnanuova.com
ServerAlias lists.sardegnanuova.com
DocumentRoot /home/sardegnanuova/public_html
ErrorLog /var/log/virtualmin/sardegnanuova.com_error_log
CustomLog /var/log/virtualmin/sardegnanuova.com_access_log combined
ScriptAlias /cgi-bin/ /home/sardegnanuova/cgi-bin/
ScriptAlias /awstats /home/sardegnanuova/cgi-bin
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/sardegnanuova/public_html>
Options -Indexes IncludesNOEXEC FollowSymLinks
allow from all
AllowOverride All
</Directory>
<Directory /home/sardegnanuova/cgi-bin>
allow from all
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.sardegnanuova.com
RewriteRule ^(.) https://sardegnanuova.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.sardegnanuova.com
RewriteRule ^(.
) https://sardegnanuova.com:10000/ [R]
<Files awstats.pl>
AuthName "sardegnanuova.com statistics"
AuthType Basic
AuthUserFile /home/sardegnanuova/.awstats-htpasswd
require valid-user
</Files>
PerlRequire /etc/webmin/virtualmin-google-analytics/apachemod.pl
PerlOutputFilterHandler Virtualmin::GoogleAnalytics
RedirectMatch /cgi-bin/mailman/([^/])(.) https://sardegnanuova.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$2
RedirectMatch /mailman/([^/])(.) https://sardegnanuova.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$2
Alias /pipermail /var/lib/mailman/archives/public
</VirtualHost>


Thanks previously for your answer to everybody…

Luca Prete

Mhm…I forgot to tell you that server version is CentOS 5.2
:slight_smile:

usermin on port 20000 is working.
webmin on port 10000 is not. Is the port open or is webmin running at all?

service webmin restart might help

the config looks okay to me.
i also cannot connect on the janas4 url on port 10000

you do have a lame nameserver though
ERROR: looks like you have lame nameservers. The following nameservers are lame:
81.208.57.105

and
ERROR: One or more of the nameservers listed at the parent servers are not listed as NS records at your nameservers. The problem NS records are:
janas.janas-tech.it
janas4.janas-tech.it

I’t take a look at the dns properties as well

Thanks, for your answer…
Well…We decided for security reasons to keep administration interface just on lan…
Anyway dns looks fine…well…if u digit www.sardegnanuova.com everything works fine…and for webmail.sardegnanuova.com too…but the problem is that everything takes you to the same page (it seems…)…for example webmail… should takes you to https://sardegnanuova.com:20000.

81.208.57.107 is the master dns named "janas4.janas-tech.com" (same machine where virtualmin is running…)

81.208.57.105 is another machine on the network but for the moment doesn’t take part to the project…

Luca Prete

I’d recommend going through the Troubleshooting Common Problems guide, with a particular focus on the DNS and Web sections. I think we’ll need to see some access and error logs to be able to offer any advice.

http://www.virtualmin.com/documentation/id,troubleshooting_common_problems/