Webmin: Good for Guru and Newbie Alike
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.
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.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Profiles and RC Files
- Astronomy for KDE
- Understanding Ceph and Its Place in the Market
- Maru OS Brings Debian to Your Phone
- OpenSwitch Finds a New Home
- Git 2.9 Released
- SoftMaker FreeOffice
- What's Our Next Fight?
- The Giant Zero, Part 0.x
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide