This is an old revision of the document!


Administration panel configuration

The panel is how we call the web-based interface where your users are going to manage services you are providing.

Install dependencies

The panel needs some more perl modules. They are not required for the VHFFS base, so you only need to install them on the server which is going to host the panel.

apt-get install libhtml-template-perl libhtml-template-expr-perl libcgi-session-perl libauthen-captcha-perl libdatetime-perl libtemplate-perl

Then check the panel by doing:

perl /usr/share/vhffs/panel/panel.pl

If you get an error message like the following, this means that a perl module is missing.

# /usr/share/vhffs/panel/panel.pl
Can't locate CGI/Session.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/share/vhffs/panel/panel.pl line 39.
BEGIN failed--compilation aborted at /usr/share/vhffs/panel/panel.pl line 39.

Later, if you get Internal server error from your HTTP server on some panel requests, it probably means that a perl module is missing. Just check your HTTP error log to find the name of the missing perl module and install it. Please tell us you do so and we will update the previous dependencies list.

Install and configure Apache2

# apt-get install apache2
~/vhffs-4.3# cp ./vhffs-doc/config/apache/panelconf /etc/apache2/sites-available/panel

then edit the file and adapt it to your needs /etc/apache2/sites-available/panel

Once you are ready, run:

# a2ensite panel
# apache2ctl graceful

If everything is working fine, you'll get the following:

# wget -q http://panel.your.host/ -O /dev/null
# echo $?
0

First VHFFS user

You can now create your first VHFFS user, which is probably going to be a VHFFS administrator.

Check that a MTA is running on the host which is currently running the panel.

# sendmail root
test
^d
# cat /var/mail/root-recipient-mailbox
From root@your.host Sun Apr 03 02:24:18 2011
(...)
Message-Id: <E1Q6B70-0006tA-RI@your.host>
From: root <root@your.host>

test

Go to http://panel.your.host/subscribe.pl and fill all the fields.

Users created through the panel or any other way offered by VHFFS are going to be unix users. Therefore you must absolutely not create a user with the same username of an already existing user on your system. If you do it, you can expect to not be able anymore to log in to your server with the duplicated user. If this is your only user you will lost the only way you had to log in to your server. More, asking your housing provider to reboot the server won't change anything, you'll probably need to physically reach the server to fix your mistake.

After the form is submitted, you'll find the mail somewhere:

  • In your Inbox if your local MTA is well configured, which is normally not the case since you were of course using a fresh Debian Install as we told you to do so :-)
  • In /var/mail/www-data if the mail bounced, which should be the current case, you'll find the following:
# cat /var/mail/www-data 
From MAILER-DAEMON Sun Apr 03 02:27:08 2011
From: Mail Delivery System <Mailer-Daemon@your.host>
To: www-data@your.host
Subject: Mail delivery failed: returning message to sender

(...)

------ This is a copy of the message, including all the headers. ------

From: VHFFS Admin <admin@your.host>
To: you@your.domain
Subject: =?UTF-8?B?W1ZIRkZTXSBXZWxjb21lIG9uIE15IEhvc3Rpbmcgc2VydmljZQ==?=

Hello Firstname Lastname, Welcome on My Hosting service

Here are your login information :
User: youruser
Password: vpV4eD0W

Your account is NOT created yet, you cannot login on the panel now, you
are going to receive another mail in a few minutes upon account creation.

My Hosting service Administrators
  • In /var/mail/youruser or any local mbox or Maildir

Of course, you can also change the password in the VHFFS database, but playing the “Where's Wally ?” game with the greeting email is fun, isn't it ?

Next, we need to create the VHFFS user on the system.

# /usr/lib/vhffs/bots/user_create.pl 
# ls /data/home/y/o/youruser
# 

You'll find another mail announcing to the user that its account is now created on the system and activated, allowing it to login to the panel and asking for services.

Log in to the panel with this user.

Next, you have to set this user as administrator, you can either change the corresponding field in the VHFFS database or you can use the VHFFS tool called vhffs-makeadmin:

# psql ...
vhffs=# UPDATE vhffs_users SET admin=1 WHERE username='youruser'; 
UPDATE 1

or

# vhffs-makeadmin youruser
User youruser is now an administrator
doc/installationguide/basic-panel.1309629963.txt.gz · Last modified: 2011/07/02 18:06 by crafty
Recent changes RSS feed Creative Commons License Donate Minima Template by Wikidesign Driven by DokuWiki