Webmin: Good for Guru and Newbie Alike

The modular design and absence of a back-end database make for a powerful and adaptable interface.
Step-by-Step Guide

Here is a step-by-step guide to configuring a new virtual-hosted web site in Apache. This guide will show you how to set up the document root, cgi-bin and logging. It looks a lot more complicated than it is. (I discovered that writing the directions for a point-and-click interface takes a lot more effort than just pointing and clicking.)

For this example, the user ID “dirk” already exists, and the virtualhost/domain we will create is test.com. It also assumes that you are using Wu-FTPd and that the domain you are setting up already resolves in DNS. First create the directories (folders) that will contain the HTML files, log files and CGI scripts for your web site. Go to the main Webmin page and click on the Other tab. Next, click on File Manager.

Use File Manager to navigate to the home directory of the web site's administrator. The administrator's home directory is the directory that the user will go to when using FTP to connect to the server. The home directory of this user is /home/username. Double click on the home directory (folder) in the left column. Double click on the user name of the web site administrator inside the home directory.

Now you need to create the necessary directories for the web site. Click on the New Folder button (the button that says “New” with the folder icon) to create the main directory for your domain (e.g., /home/dirk/test.com). Double click on the directory you created (e.g., test.com) to move inside it. Now, create three folders (htdocs, logs and cgi-bin) in the directory you just created. In our example, we would have created the following directories: /home/dirk/test.com, /home/dirk/test.com/htdocs, /home/dirk/test.com/logs and /home/dirk/test.com/cgi-bin.

Now, go back to the home directory for the user. In the right column, click once on the directory for the web site (e.g., test.com), then click on the Info button at the top of the page. In the Info window, change the user and group to the correct user ID (e.g., dirk). Change the pop-up menu in the “Apply changes to” section to “This directory and all subdirectories”. Click Save.

Go back to the main Webmin page by clicking on “Return to index” at the bottom of the page. Click on the Servers tab, then click on Apache Webserver. If this is the first time you have clicked on Apache Webserver in Webmin, it will ask you to allow Webmin to check the configuration of Apache (just click on Configure).

Now scroll to the bottom of the page, and you will see a form for adding new virtual sites. Enter the IP address for the web site in the Address text field. If you are doing name-based hosting, make sure the “Add name virtual server address” box is checked. The Document Root should be /home/userid/domain/htdocs (e.g., /home/dirk/test.com/htdocs). Enter the name of the web site in the Server Name text field (e.g., www.test.com), and click Create.

Scroll through the Virtual Servers list until you find the web site you created. Click on the Virtual Server for that web site. To set up your cgi-bin folder, click on “CGI Programs” in the “CGI directory aliases” row. In the From text field, enter /cgi-bin/. In the To text field, enter /home/userid/domain/cgi-bin/. This must end with a “/” (e.g., /home/dirk/test.com/cgi-bin/). Click Save.

Click on Log Files. In Access Log Files, enter /home/userid/domain/logs/access_log (e.g., /home/dirk/test.com/logs/access_log) in the text field that has File or Program written above it. If you would like to have a log that contains hits and referrer information, then in the Format column of the “Access log files row”, switch the check box from Default to the check box next to the text field and enter “combined” in the text field. Click Save, and click on “Networking and Addresses”. Enter the e-mail address of the webmaster for this web site in the “Server Admin email address” text field. Then check the box next to the text field, and click Save.

You have now set up the web site, but before it goes live there is one final and important step. In the upper right-hand corner is a link called Apply Changes; click on it to activate your changes.

Security

Webmin offers a number of security features. The first line of defense is a user ID/password authentication system that is completely independent of the user ID list kept in the /etc/passwd file. This means someone can be granted access to Webmin without allowing the user any other OS-level system privileges. Webmin also fully supports SSL. If you have the Perl SSL module installed, all your Webmin sessions can be encrypted to prevent attackers from gaining information about your system from watching them.

Webmin also allows for fine-grained control of the various available modules. You can, for example, grant users control over the entire DNS server without giving them access to Apache configurations or limit them to only the domains they own in the DNS module (see Figure 4). This ability to limit and redistribute control can come in handy if you need to delegate tasks to other administrators. Finally, Webmin also can be configured to log all changes made via the interface, a feature that is extremely useful for troubleshooting.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Awesome post

Anonymous's picture

Good work !
Webmin Rocks!!
I put together this pdf
http://t3.woodel.com/my-linux-how-to/debian_howto_start_to_finish_using_...

Use of bold etc.

Lasse Heindorff's picture

Fine articles, but very difficult to read. I know it's an old article, but you could none-the-less consider using bold on headlines, bullets to make it more readable, etc.

School Project

Brian Kramer's picture

I've asked a few people who have relations to Webmin for some help but they have not responded... if you read this please consider what I have to say.

Hi,

I was givin the task to setup a system at my school to allow students to sign up to a program, and then develop a website... having that website being allowed to be viewed on our network.

I found webmin and usermin and thought that I had the solution and I think there may be a way to get it to work (in the file manager students can just create a new file and then instert the html, though some kind of script to allow them to make a website like geocities or freewebs.com would be very NICE!)

I need help allowing users' files to be view in such a format as:
http://216.186.36.50:20000/username/file.html

I'm not sure HOW to allow this though.

Also if anyone knows of any scripts that I can use for free (I'm doing this for free) that would allow users to make a site on the server (It's running a version of linux redhat that I installed) that would be awesome!

Finally.. is there anyway to allow people to sign up for an account? So that I do not have to set up every single user...

Thanks!

Re: Webmin: Good for Guru and Newbie Alike

Anonymous's picture

Your article is excellent. I use webadmin and it is great.

Would like to know more about your background as I am an Elmendorf as well, Jim Elmendorf, elmendorfjl@yahoo.com.

Look forward to hearing from you.

Jim

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix