HTTP Service: Installation and Configuration on Windows and Linux

Item 4 – Installation and Configuration of the HTTP Service

Introduction

The use of services such as FTP has enabled users to access information located on a distant server. HTTP emerged to provide users access to remote information in a simple and intuitive way, resulting in what is known as the World Wide Web (WWW). Users use this service to access web pages or documents. In addition to text, these pages may include other elements that also provide user information, including images, sound, and video. These are known as hyperlinks. These links appear highlighted, and when you mouse over them, the pointer changes its appearance. The format for including various types of information and references is called HTML.

The pages have static content, i.e., they do not allow interaction by the user. They are simply listed and, at most, provide access to other pages through hyperlinks. To get users to interact with them, these pages should be dynamic. Some of these languages to create dynamic pages are:

  • PHP: A language whose instructions are part of the HTML document. It is interpreted and processed on the HTTP server, and then the client sends the resulting HTML document.
  • ASP (Active Server Pages): Its code is implemented by combining scripts and HTML documents. Like PHP, it is interpreted on the server, and the resulting HTML document is sent to the client.
  • Java: A programming language based on C++ that incorporates animation and interaction on pages using what is known as applets. An applet is a small program that is obtained and executed by the client software.
  • JavaScript: A language based on the previous one. Its instructions are part of a page or HTML document and are interpreted by the client software.
  • CGI (Common Gateway Interface): Not really a language but an interface that allows HTML documents to exchange data, e.g., Perl programs.

To properly display pages, the client uses special software called a browser or viewer. Access to a page requires the user to provide various information to the browser, such as the web page they want and where to locate it, specifying what is known as a URL. The pages are stored on HTTP servers, located in a directory called a specific site or site. In this directory, there is usually a hierarchy of subdirectories to organize the different pages and the various elements of them (backgrounds, images, websites, etc.). The index.htm page was placed in the root directory as the main page and index to give access to other pages. This is shown by default when only the server you want to access is indicated.

The Proxy Service

The proxy service acts as an intermediary between users on a network and the Internet, according to demand on other services such as HTTP for clients. If the requested information is on the proxy server, it is provided to the client. Otherwise, the proxy requests it from the web server and stores it. The storage is done in a hard disk space known as cache. This cache replaces the stored information in response to a replacement algorithm (replacing the information unless requested). Those who use this technique are called proxy caches. Sometimes the information that is stored becomes obsolete when the web server is updated rapidly, returning the client an outdated website. Some proxy servers allow you to set the update time information. Not all elements of the Web are stored in the proxy, as some are considered non-cacheable (e.g., counters of visits). The storage locally on an intranet from different localized information on the Internet makes clear the advantages of this service: bandwidth consumption is reduced, as are response times.

Some proxy servers can exert some control over clients and determine which are permitted access to the Internet, restrict information, force user authentication, and keep track of the required information and the client who requested it. It is possible to have cooperation between several proxy caches by a UDP-based protocol called ICP. This protocol will enable them to interact and see the server that has stored the information requested by the client. In the case of having several candidates with the required information, a server is selected based on various factors, such as duplicate information on multiple servers, as with HTCP.

Transparent Proxy

A CARP or proxy server can be configured to work transparently to clients. The user does not perceive the existence of the server; they simply call the gateway that gives access to the Internet. However, the proxy server acts as a gateway, receiving requests from clients and redirecting the port assigned to the proxy service for attention.

Application Proxy or HTTP Proxy

We have dealt with a kind of proxy server designed to obtain the requested information and provide it to customers, as a server. This type of proxy does not allow access to certain services such as POP or SSH.

SOCKS Proxy

Another type of proxy can provide any service for a virtual server. This type of SOCKS server uses the protocol to establish TCP connections to panel mode switching between a local computer network and another on the Internet. They often exert firewall, hide the client IP addresses, and filter the packets to or from the Internet.

Installing and Configuring the HTTP Service

IIS is the HTTP server used by a wide range of Microsoft operating systems, and Apache 2 is the usual server on Linux. To use this service, you must enable HTTP access to the port (default 80) and have configured access to TCP/IP.

Installing the Software (IIS)

To check if IIS is installed on your computer, you can view the “Services” page of the network properties or the installation tool of Windows components accessible from the control panel. In case the service is not installed, we will install the selected component:

  1. Select the component to install, in this case, IIS (Internet Information Server).
  2. During installation, you are prompted to select the elements of IIS to install. For the HTTP service, select the Internet Service Manager and the World Wide Web service.
  3. Finally, specify the folders that contain the files for this service.

Configuration

The Internet services of IIS or the W2003 server administrator uses the service manager. Although the server offers a predetermined site (inetpub\wwwroot folder), you can create a new one through the main menu option: Action > New. IIS Server 2000 and 2003 are capable of managing multiple sites. This has to keep each site on a different port to be able to meet the requests.

When you create a new website, specify:

  • A short description of the site (for identification).
  • The server IP address and port access to the site (default 80).
  • The kit used for the service and, if desired, anonymous access.
  • Access permissions for users accessing the site, such as reading its content and executing certain commands and applications like CGI.

Additionally, other parameters can be set by selecting “Properties” from the context menu of the website created. The parameters are grouped into sections: Website, Performance, Directory, Documents, Custom Errors, Directory Security, and HTTP Headers.

Starting the Service

From the Internet Service Manager, you can stop and resume the web service created at any time. You can use the buttons located on the toolbar of this utility or through the “Action” menu. Try its operation, indicating how URLs on your browser, or your local IP 127.0.0.1, and the index must be displayed.

Installing and Configuring SQUID on Windows Server

Its installation requires these simple steps:

  1. Unzip the file to your hard drive, for example, in the C: drive.
  2. Rename the file squid.conf to squid.conf.default and mime.conf.default to mime.conf, both located in C:/squid/etc.
  3. Edit the squid.conf configuration file and modify the settings as needed. Enter the name of your computer on the visible_hostname parameter.
  4. Run C:/squid/sbin/squid.exe -z. Its execution will create the folder structure necessary for the cache.
  5. Execute the command C:/squid/sbin/squid.exe -i to install it as a service on the operating system.

Some Features

  • Allows management of cache content, deleting objects that have become obsolete.
  • Monitors through log files or log requests made by users.
  • Allows control of access to the service through directives.
  • Allows you to filter content for HTTP applications.
  • Supports CARP protocol for information sharing and load sharing with other servers.
  • Can be configured to require authentication by users.