Author Topic: Webmin or Usermin  (Read 725 times)


  • Orange Belt
  • ***
  • Posts: 83
  • Karma: +0/-0
Webmin or Usermin
« on: August 30, 2013, 01:14:16 PM »

Can I run Webmin or Usermin under Apache?


  • Green Belt
  • *****
  • Posts: 224
  • Karma: +1/-0
Re: Webmin or Usermin
« Reply #1 on: October 17, 2013, 01:06:58 AM »

Like Webmin, Usermin can be run under Apache using a similar process. To set up Apache to run it, the steps to follow are :

Create a new Apache virtual server with the document set to the directory where you installed Usermin, using a directive like DocumentRoot /usr/local/usermin.

Configure Apache to treat all files with the .cgi extension as CGI programs, with the AddHandler cgi-script .cgi directive.

Add index.cgi to the DirectoryIndex directive.

Usermin CGI programs have their config directory passed to them in the WEBMIN_CONFIG, WEBMIN_VAR and MINISERV_CONFIG environment variables. For Apache to do this, you need to add the directives

SetEnv WEBMIN_CONFIG /etc/usermin

SetEnv WEBMIN_VAR /var/usermin

SetEnv SERVER_ROOT /usr/local/usermin

SetEnv MINISERV_CONFIG /etc/usermin/miniserv.conf


Create a new <Directory> section for the root directory, like
<Directory /usr/local/usermin>

Add the directive Options ExecCGI to the new <Directory> section.
Password-protect the virtual server by putting directives like

AuthName Usermin
AuthType basic
AuthUserFile /etc/usermin/htusers
require valid-user

Inside the <Directory> section. The file /etc/usermin/htusers must contain an entry for every Unix user that you want to allow to login to Usermin.

Make all the Usermin programs owned by root and setuid with the commands
chown -R root:root /usr/local/usermin

chmod -R 6755 /usr/local/usermin

Add the -U flag to the perl line in all the Usermin scripts. This can be easily done with the following command run from the usermin directory

find . -name "*.cgi" -o -name "*.pl" | perl "/usr/bin/perl -U" -
This assumes that Perl is installed as /usr/bin/perl on your system.
Configure Usermin to use the 'Default Usermin Theme', as Apache cannot support Usermin's theming system.