Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux+ Certification Bible.pdf
Скачиваний:
46
Добавлен:
15.03.2015
Размер:
3.78 Mб
Скачать

220 Part III Configuration

From this menu, you can configure the modem in more detail, including the following:

You can turn off many normal standards, such as hardware flow control, which is useful when connecting two machines directly with the serial port.

You can enable escape control characters that are normally automatically negotiated during connection creation.

You can choose to attempt to stay connected if known errors occur. This option is usually left “on,” so that you can troubleshoot the connection.

You can choose to allow any user to connect or disconnect the configured connection. You may consider this option if you don’t want users to know the root user password in order to establish the newly created connection.

You can select the line speed. For troubleshooting connections that don’t connect completely or disconnect often, this is very useful. By choosing a lower connect speed, you can see if the system will react better with less errors than at a higher speed.

Server Tasks with linuxconf

The linuxconf program can configure some basic server functions for the Linux system.

NFS

You can use the linuxconf program to configure the NFS (Network File System) clients, thus allowing other UNIX and UNIX-like systems to share resources. The menu, which is shown in Figure 7-12, allows you to configure shared resources, comments, client names, and privileges.

Sun Microsystems developed NFS, which has been designated as a file server standard. NFS uses the SUN Remote Procedure Call, which is a protocol that one program can use to request a service from a program (located on another computer in a network) without requiring an understanding of the network details. It normally uses the NIS for naming resolution. NFS is portable to other UNIX-like systems, such as Linux, and even Microsoft clients with the use of the Sun Solstice Network Client.

Sun Microsystems has extended NFS to WebNFS, which extends the use of NFS to the Internet. WebNFS offers several advantages over HTTP and FTP: It doesn’t require the opening and closing of connections for each requested file, and large file downloads are supported and can be downloaded in sections to ease recovery. Netscape, Oracle, IBM, Apple, and Novell have announced support for WebNFS. Sun hopes that the World Wide Web Consortium will adopt it as a standard for the Internet.

Chapter 7 Configuring Networking 221

Figure 7-12: Configuring a NFS Share

IP aliases for virtual hosts

IP aliases allow the system to create virtual servers, and are used to create virtual systems on one interface. Figure 7-13 demonstrates this by showing the screen that follows the initial selection of the interface that will have virtual hosts.

Most Linux users with only six months of experience probably haven’t used Virtual Hosts; however, you should be aware of their existence and the basics of how to create them.

To create a range of virtual hosts, follow these steps:

1.At the virtual host configuration screen, enter a range of IP addresses. For example, use a range of 192.168.0.200-250 for a system on a 192.168.0.0 network.

2.In the “Configure domain name server” menu, select the “IP allocation space” entry, enter the range, and type in “Virtual domains” as a short description.

3.Go into the DNS and add a host for the domain with a FQDN. Then hit ctrl-X to prompt Linuxconf to compute the first unused IP address in the IP aliases range. Use this IP address.

4.Use the httpd configuration and add a section for the new FQDN. Repeat this as often as necessary for additional virtual hosts.

222 Part III Configuration

Figure 7-13: Creating Virtual Hosts for an Ethernet Connection

Virtual hosts work very well for service providers to enable many personal Web sites or commercial sites on one physical server.

Apache Web Server

The Apache Web server is currently the most popular Web server. Apache exists to provide commercial-grade software that is capable of providing for the Hypertext Transfer Protocol (HTTP). HTTP is a standard for creating documents to be viewed over the Internet. The standardization of HTTP was started within the IETF (Internet Engineering Task Force) in late 1994 and has evolved into the standard method of displaying Web pages. The linuxconf program can perform a basic configuration on the Apache server. To do this,

1.Choose Networking Server Tasks Apache Web Server.

2.When you select the Apache Web server, a menu appears that allows configuration of the Web server.

3.Select the defaults option to allow the input of information for the default configuration.

Basic section

This section includes the entry of the Web administrator or Web master’s e-mail address. The domain IP address allows several virtual domains to share a single IP address, which should also be entered in this configuration. The server name is used if DNS or the host’s file name resolution is not working correctly, or if the server has a name different than the FQDN. The document root is the file system

Chapter 7 Configuring Networking 223

location of the files used for the Web service. Figure 7-14 shows that the location is the default of /var/www/html.

The next option to configure is for script aliases, which provide the location of script files, such as CGI (Common Gateway Interface), to be run with the Web site. Next you must configure a user ID and group ID, which are used to control access to the Web server. Usually this ID is a created account, called “Apache” for example, that has only read capabilities and perhaps writes to a temporary directory for executables. Don’t allow too much access to users accessing the system because they can make unwanted changes to the system.

Figure 7-14: Default Configuration of the Apache Web Server

Logs section

The next section in the Apache configuration is for log files.

Error logs: Review this log on a Web server because it can indicate problems with the Web server and be used to correct the errors. A common location for this file is /var/log/httpd/error_log. Look for this log on a system using the Apache server.

Transfer logs: Are used to track all traffic or access to the Web server and are filed in the Common Log File format. This file may grow quite large for very busy Web servers, so spend some time planning your file locations.

Agent logs: Tracks Web page access.

Referrer logs: If access to the server was generated by a link from another page, the access is logged here.

224 Part III Configuration

Tuning section

The tuning section allows the custom configuration of some of the performance settings of the Apache server. The following list details the configuration options:

Private Web sites: When a user requests a Web page by typing www.linux.org, the browser assumes that — unless otherwise instructed — it will use the default port for HTTP, which is 80, which is used for all public web sites. If you wish to hide your private web sites on a different access port, you can set it to something like 8080. This way, clients will have to specify the web page on that port to get a connection.

PID (process identifier) file location: This is seldom changed because it holds the PID of the main process.

Timeout: This is used to disconnect clients who connect to the Web server but don’t make a request of the system.

Host name lookup: This allows the system to log not only the IP address of the connecting client but also the name of the client. Unfortunately, this option has two major drawbacks:

It creates much more network traffic when looking up every client host name.

The Web page won’t be displayed until the task is completed, therefore slowing the display of the Web page to the client.

This is an excellent tool for very small Web sites to track users. The action that this tool accomplishes, however, can be completed in more efficient ways — especially for large Web sites.

Features

The Features section controls the ability to activate advanced items such as scripting. The features include the following:

Server side includes option. Can be used with the extension shtml. The server-side include command simply expands to the contents of a given file and allows bits of HTML or text to be shared between pages for ease of updating.

NOEXEC option. Activates the Server side includes option, but uses SSI tags to disable CGI scripts.

Indexes option. Allows a list of available files in the Web directory to be displayed if the default index.html file is not present. If this option is turned off, then Error 404, “file not found,” is returned as an error message.

May follow symlinks option. Must be turned on if symbolic linked folders or files are to be followed when accessed on an Apache server.

Follow symlinks if owner matches option. Continues the May follow symlinks option with the added verification that the owner of the file is accessing the symbolically linked file or directory and that all others are denied access.

Соседние файлы в предмете Операционные системы