In fact, now you have started the Linux WEB service, you simply need to do Linux system connected to the Internet, and then deposited in the Home “/ home / httpd” directory can be. However, in order to make this WEB server more efficient, we need to make some settings, targeting specific needs of the fact that just four copies of the document. Following its two main httpd.conf and access.conf configuration files for more:
1. Httpd.conf.
This document is the main configuration file, mainly used to launch the server set up the basic environment, which means it is responsible for arranging WEB server how to run. Set the parameters for its relevance:
ServerType standalone / inetd: This option is the role of designated manner in which the operation WEB server. These parameters that WEB standalone service process to a separate waiting process in the background listening whether the client’s request, if there is to generate a process of its services, its more efficient. Is the main server process interception set up a specific port address, to: Port [number] (default 80).
Inetd relatively standalone mode and it is more secure, this mode is also running Apache RedHatLinux the default mode. If your version is not RedHat, would in / etc / inetd.conf file a new line by adding the following: httpd stream tcp nowait httpd / etc / httpd / bin / httpd-f / etc / httpd / conf / httpd.conf; Then / etc / services in the same document to add a new line: httpd 80/tcp httpd to.
ErrorLog: used to record the document specified the wrong name and path. Formats such as: ErrorLog / var / httpd / error.log.
ServerRoot: server will be used to specify the configuration and where to store the log files. Formats such as: ServerRoot / etc / httpd.
Server Admin: WEB administrator set up the E-Mail address. Formats such as: Server Admin XXX@XXXX.com.
2. Srm.conf
This is Apache’s resource profile, role for the server you want to tell the WWW site to provide the resources and how to provide, the main parameters:
DocumentRoot: the main document used to specify the address. Formats such as: DocumentRoot / home / httpd / html.
DirectoryIndex: windows platform with the IIS installed, used to specify the name Home. As we all know, generally to Home “index.html” or “index.htm” as the file name. When these two is set to file name, as long as users sent WEB request to be transferred to “index.html” or “index.htm” named after the home page. Formats such as: DirecotryIndex index.html index.htm.
After more than a simple configuration, you have the WEB server with the basic function. Next to do is restart WEB services to enable the configuration to take effect earlier, we can use the following command to complete:
/ etc / rc.d / init.d / httpd restart
Finally, we take a look at Apache based on the security services. Apache server through the certification system can control which hosts can access certain sites. Specifically, it achieved in two ways:
One is the address of the host-based authentication, but because the majority of current Internet users are using the dynamic address, so this way the number of no practical significance;
Another way is based on the user name / password authentication, self-evident, in a way more suitable for today’s network status, and for specific user name / password authentication to achieve, not to discuss the scope of this paper, we can see the relevant information For further study.
Bookmark:Digg Del.icio.us Reddit
