Virtualmin questions. Ftp, Dns and server settings

Hello everyone !
I’m web developer from Russia. (and server administrator from a little time)

I’ve just bought a new server in datacentre.
I had a clear CentOS 5.3 installed on it.
I’ve got ip for it (example x.x.x.x further) and a hostname (x.x.x.x.colo.static.dc.domain.tld)

First, i’ve added string to /etc/hosts like:
x.x.x.x x.x.x.x.colo.static.dc.domain.tld

after that command hostname -f prints x.x.x.x.colo.static.dc.domain.tld

Then i set up dns. I registered domain (example: site.com) and created to subdomains: ns1 and ns2 and set IPs for them (for ns1 = ip of this server, for ns2 = ip of my another server with virtualmin).
I added Virtual Server for this domain (site.com) and in dns settings for it i set nameservers ns1.site.com and ns2.site.com. In Address part i’ve also added records

Then, i’ve downloaded virtualmin install script and installed it…

All works fine, but some problems:

  1. I’m trying to add simply another Virtual Server (first i added site.com, as i wrote before) and i get such error: “Failed to create virtual server : A ProFTPd virtual server with the same IP address already exists”.
    My ProFtpd config : (generated by virtualmin)
    ServerName “ProFTPD server”
    ServerIdent on “FTP Server ready.”
    ServerAdmin root@localhost
    ServerType standalone
    #ServerType inetd
    DefaultServer on
    AccessGrantMsg “User %u logged in.”
    #DisplayConnect /etc/ftpissue
    #DisplayLogin /etc/ftpmotd
    #DisplayGoAway /etc/ftpgoaway
    DeferWelcome off

Use this to excude users from the chroot

DefaultRoot ~ !adm

Use pam to authenticate (default) and be authoritative

AuthPAMConfig proftpd
AuthOrder mod_auth_pam.c* mod_auth_unix.c

IdentLookups off
UseReverseDNS off

Port 21
Umask 022

Default to show dot files in directory listings

ListOptions “-a”

Allow to resume not only the downloads but the uploads too

AllowRetrieveRestart on
AllowStoreRestart on

MaxInstances 20

Set the user and group that the server normally runs at.

User nobody
Group nobody

Disable sendfile by default since it breaks displaying the download speeds in

ftptop and ftpwho

UseSendfile no

This is where we want to put the pid file

ScoreboardFile /var/run/proftpd.score

Normally, we want users to do a few things.

AllowOverwrite yes AllowAll

Define the log formats

LogFormat default “%h %l %u %t “%r” %s %b”
LogFormat auth “%v [%P] %h %t “%r” %s”

ServerName site.com User ftp Group ftp UserAlias anonymous ftp DenyAll RequireValidShell off ExtendedLog /opt/sites/site/logs/ftp.log

I want an ability to login to Virtual Server’s ftp through a domain like ftp.site.com, ftp.site2.com, ftp.site3.com etc.

  1. I’m trying to add server in DNS Cluster Slave Server i got error “Failed to connect to fastrpc.cgi : Failed to connect to x.x.x.x:10003 : No route to host”

Friends! Help me plz !

Best Regards, Konstantyn

ohh, config commented lines became big letters !!

“Failed to connect to fastrpc.cgi : Failed to connect to x.x.x.x:10003 : No route to host”

you have to open ports in your firewall: 10000 - 10100

connecting to ftp can be done by site.com; site2.com etc.

ronald, Thanks !
I’ll try your advice.

And what about ftp ? When i’m trying to add a new one Virtual Server, i get error:
“Failed to create virtual server : A ProFTPd virtual server with the same IP address already exists”
I listed proftpd config before.

Help me plz

Did you try to create a different domainname or a subserver like sub.site.com? Did you do a Re-Check Config under Virtualmin- System Settings?

i made recheck and got:
" The Suexec command on your system is configured to only run scripts under /home, but the Virtualmin base directory is /opt/sites. CGI and PHP scripts run as domain owners will not be executed.

… your system is not ready for use by Virtualmin."

How to configure Suexec to run scripts in other directory ? (i need other directory, cause more disk space on /opt)

I dont know exactly, but it seems you need to recompile suexec pointing to /opt/sites instead of the default /home

also Im not sure this will work with virtualmin, can you mount /opt to /home instead?

how to do that ? how to mount /opt to /home ??
or how to recompile Suexec ?

You can download the apache source for your servers OS.
then
compile it with: ./configure --enable-suexec --with-suexec-docroot=/opt/sites --with-suexec-userdir=public_html --with-suexec-caller=apache --with-suexec-logfile=/var/log/httpd/suexec.log

Then run a make, and use the copy in support/suexec.

while doing a ./configure, make sure the line and paths are correct for your system.

you can als try to symlink opt to home, but Im not sure virtualmin likes it that way. You’ll need a second opinion

so, i don’t need to delete apache that is working now ?
i can simply dowload the last version and compile it ?

i’ve fixed problem with suexec.
I rechecked virtualmin’s config. All works fine!

But i can’t create more than 1 virtual server !!! I always get error ““Failed to create virtual server : A ProFTPd virtual server with the same IP address already exists””

help me plz !!!

Hey i start to say i like this control panel very much :slight_smile: but i also have problem with proftp, “A ProFTPd virtual server with the same IP address already exists”
cmon can some one please help? :slight_smile: i use the free version but once i know all is working fine i will defently buy this for my server.

Are you enabling the “IP-based virtual FTP enabled” feature?

That’s not the same as plain old FTP – you wouldn’t want to enable that unless you have a dedicated IP for each Virtual Server.

-Eric