Setting up an HTTP server using Apache
You can configure Corel LINUX to be an HTTP (Web) server using Apache. Apache is a daemon and is one of the most popular software packages used to create HTTP servers. Apache was developed from the collective effort of developers who wanted to fix the bugs in NCSA httpd, one of the original HTTP servers. Out of this effort, eight core contributors founded the Apache group. The first release of Apache became available in April 1995. For information about Apache, visit the Resources site on the Corel LINUX Web site at: http://linux.corel.com.
The HTTP protocol is a TCP/IP protocol used to transport hypertext documents across the Internet or intranet. For information about the HTTP protocol, see "HyperText Transfer Protocol." The HTTP protocol is based on a client/server relationship. An Internet browser, such as Netscape Navigator, is an HTTP client. The HTTP client connects to an HTTP server to access the server's data. The HTTP server is a computer with data that can be downloaded. For example, if you connect to the Corel Web page, the Corel HTTP server will have all the data that you can access on it. Every graphic file, HTML file, and audio file that appears on the Corel Web page is located on the Corel HTTP server.
You must configure three files to set up the HTTP server. The configuration files are made up of values known as directives. The values of the directives determine the type of HTTP server. For example, you can configure the HTTP server to run continuously or when you need it. If you want to configure the HTTP server to run continuously, then you must set the ServerType directive, located in the httpd.conf file, to standalone. If you want to configure the HTTP server to run as you need it, then you have to set the ServerType directive to inetd. A standalone server continuously waits for connection requests from HTTP clients.
The three files that must be configured are:
httpd.conflets you set general settings. You can set values such as the port number, server administrator's email address, and the location of the error log.
srm.confLets you set the server's resources. You can set values such as the location of the DocumentRoot and common gateway interface (CGI) script information.
access.confLets you set security settings. You can specify the HTTP clients that are allowed or denied access to directories and specific files.
Note
By default, these configuration files are located at /etc/apache/. It is strongly recommended that you keep the configuration files in the default directory.
You can create a Web site once the HTTP server is set up. You need to save an HTML file in a specific directory so that the HTTP server can locate the HTML file. You can specify the directory in the DocumentRoot directive. If you want to insert a graphic file in your Web page, then you can save the graphic file in the same directory as the HTML file. If you have links in your Web site, you must code the links in the HTML file. You must make sure that the links reflect the directory structure located on the HTTP server. If you do not provide the correct directory structure, then the HTTP server will not be able to locate the HTML files.
Apache lets you set up HTTP server scripting programs using common gateway interface (CGI) script. A Web page is static meaning that once you download a Web page, it does not change. This means that the HTTP server cannot interact with the HTTP client in real time. If you set up a Web site that has to process data, such as a password, you need to use CGI script. For information about CGI script, see "Working with CGI Script." You can create CGI script in a text editor. You can program CGI script for a wide range of activities, from processing a credit card to calling another Web page. You can also use Server-Side Include programs to modify your Web page. For information about Server-Side Includes, see "Working with Server Side Includes."