Setting the Apache User Account
The Server tab of the HTTP configuration tool lets you set several configuration options, the most important of which is the user account that Apache will run under. By default, this account is named apache, and it belongs to a group named apache. This account is created automatically when you install Apache, so you don't have to do anything special to configure it.
Although it may be tempting, resist the urge to change this user setting to a user account with more rights. If you do so, you run the risk of a major security breach. An intelligent hacker can use a Web browser to break into your system. But the hacker will be constrained by the rights granted to the user account that Apache runs under. One of the worst mistakes you could make would be to change this user account from apache to root. Then, a hacker who manages to exploit a security hole in your Web site will have virtually free reign over your Linux server.
Manually Editing Apache's Configuration Files
If you're allergic to GUI configuration tools, you can configure your Apache server by directly editing the configuration files. Apache's configuration settings are found in three separate configuration files, named httpd.conf, srm.conf, and access.conf. These files are located in /etc/httpd/conf in Fedora Core Linux, but they may be in a different location in other Linux distributions. Be sure to study the Apache documentation before you start messing with these files.
Whenever you make a configuration change to Apache, you should restart Apache by using the service httpd restart command.
Creating Web Pages
This section is about how to create and edit HTML content for your Web site. Just want to point out a few key things that you need to know in order to set up a Web site using Apache:
- The default location for Web documents is /var/www/html. When you create Web pages for your site, save them in that directory.
- When a user visits your Web site by typing just the domain name without a filename (for example, www.mydomain.com instead of www.mydomain.com/file1.html), Apache displays the file named index. html or index.htm. You should give the home page for your Web site one of these two names.
- If you're a programmer, you can build complicated Web-based applications using PHP, which is installed along with Apache.
In this tutorial:
- Managing Linux Systems
- Planning a Linux Server Installation
- Installing Fedora 7
- Getting Used to Linux
- Understanding the file system
- On Again, Off Again
- Using GNOME
- Managing User Accounts
- Linux Network Configuration
- Restarting Your Network
- Working with Network Configuration Files
- The ifcfg files
- The resolv.conf file
- DHCP and DNS
- Configuring DHCP
- Running a DNS Server
- Running Apache
- Starting and Stopping Apache
- Confirming that Apache Is Running
- Using the HTTP Configuration Tool
- Restricting Access to an Apache Server
- Configuring Virtual Hosts
- Setting the Apache User Account
- Running Sendmail
- Installing Sendmail
- Modifying sendmail.mc
- Using SpamAssassin
- Using the Mail Console Client
- Running FTP
- Starting the vsftpd Service
- Configuring FTP