Apache2 Http Server

Apache HTTP Server is a free and open-source web server that delivers web content through the internet. It is commonly referred to as Apache and after development, it quickly became the most popular HTTP client on the web. 4.1.2 Installing the Apache HTTP Server Plug-In. The Apache HTTP Server plug-in is distributed as a shared object (.so) for Unix platforms and a DLL for Windows. To install the Apache HTTP Server plug-in: Make sure that the weblogic-plugins-1.1/lib folder is included in LDLIBRARYPATH on Unix systems (and PATH on Windows systems).

This chapter describes how to install and configure the Apache HTTP Server plug-in. It contains the following sections:

Note:

For proxying requests from Oracle HTTP Server to Oracle WebLogic Server, use the mod_wl_ohs plug-in, which is similar to the plug-in for Apache HTTP Server, but need not be downloaded and installed separately. For information about configuring mod_wl_ohs, see Chapter 2, 'Configuring the mod_wl_ohs Plug-In for Oracle HTTP Server.'.

4.1 Install the Apache HTTP Server Plug-In

After you download the Apache HTTP Server plug-in as described in Section 1.2, 'Availability of Version 1.1 Plug-Ins,', you can install it as an Apache HTTP Server module in your Apache HTTP Server installation.

4.1.1 Installation Prerequisites

Before you install the Apache HTTP Server plug-in, do the following:

  • Download the Apache HTTP Server plug-in, as described in Section 1.2, 'Availability of Version 1.1 Plug-Ins.'

  • Extract the plug-ins zip distribution to the location of your choice on the target system; for example, /home/myhome/weblogic-plugins-1.1/.

  • Install JDK 6 if you want to use SSL. The JDK 6 installation is required to use the orapki utility, which manages public key infrastructure (PKI) elements, such as wallets and certificate revocation lists, for use with SSL.

  • Make sure that you have a supported Apache HTTP Server installation.

    For more information, see:

    http://www.oracle.com/technology/software/products/ias/files/fusion_certification.html.

  • Make sure that a supported version of Oracle WebLogic Server is configured and running on a target system. However, it does not need to be running on the system on which you extracted the plug-in zip distribution. For the supported Oracle WebLogic Server versions, see:

    http://www.oracle.com/technology/software/products/ias/files/fusion_certification.html.

4.1.2 Installing the Apache HTTP Server Plug-In

The Apache HTTP Server plug-in is distributed as a shared object (.so) for Unix platforms and a DLL for Windows.

To install the Apache HTTP Server plug-in:

  1. Make sure that the weblogic-plugins-1.1/lib folder is included in LD_LIBRARY_PATH on Unix systems (and PATH on Windows systems). If you do not do this, you see linkage errors when starting Apache HTTP Server.

  2. In the location where you unzipped the downloaded plug-in file, locate lib/mod_wl.so, or libmod_wl.dll for windows; for example, /home/myhome/weblogic-plugins-1.1/lib/mod_wl.so.

  3. Verify that the mod_so.c module is enabled.

    If you installed Apache HTTP Server using the script supplied by Apache, mod_so.c is already enabled. Verify that mod_so.c is enabled by executing the following command:

    • Windows

    • UNIX/Linux

    (APACHE_HOME is the directory that contains the Apache HTTP Server installation.)

    This command lists all enabled modules. If mod_so.c is not listed, you must rebuild your Apache HTTP Server, making sure that the following configure option is specified:

  4. Make a copy of the APACHE_HOME/bin/httpd.conf file for backup.

  5. Open the httpd.conf file.

  6. Install the Apache HTTP Server plug-in module for Apache 2.2.x by adding the following line. For Windows, specify the .dll file.

  7. Verify the syntax of the httpd.conf file by running the following command:

    • Windows

    • UNIX/Linux

    If the httpd.conf file contains any errors, the output of this command shows the errors; otherwise, the command returns the following:

4.2 Configure the Apache HTTP Server Plug-In

This section describes how to edit the httpd.conf file to proxy requests by path or by MIME type, to enable HTTP tunneling, and to use other Oracle WebLogic Server plug-in parameters.

4.2.1 Editing the httpd.conf File

Edit the httpd.conf file in your Apache HTTP Server installation to configure the Apache HTTP Server plug-in.

  1. Open the httpd.conf file, if it is not already open.

  2. To proxy requests by MIME type, add an IfModule block that defines one of the following:

    • For a non-clustered WebLogic Server: the WebLogicHost and WebLogicPort parameters.

    • For a cluster of WebLogic Servers: the WebLogicCluster parameter.

    Example:

  3. To proxy requests by MIME type, add a MatchExpression line to the IfModule block. Note that if both MIME type and proxying by path are enabled, proxying by path takes precedence over proxying by MIME type.

    For example, the following IfModule block for a non-clustered WebLogic Server specifies that all files with MIME type .jsp are proxied:

    You can also use multiple MatchExpressions, for example:

    If you are proxying requests by MIME type to a cluster of WebLogic Servers, use the WebLogicCluster parameter instead of the WebLogicHost and WebLogicPort parameters. For example:

  4. To proxy requests by path, use the Location block and the SetHandler statement. SetHandler specifies the handler for the Apache HTTP Server plug-in module. For example the following Location block proxies all requests containing /weblogic in the URL:

    The PathTrim parameter specifies a string trimmed from the beginning of the URL before the request is passed to the WebLogic Server instance (see Section 7.1, 'General Parameters for Web Server Plug-Ins').

  5. The PathTrim parameter must be configured inside the <Location> tag. These known issues arise when you configure the Apache plug-in to use SSL

    • The following configuration is incorrect:

      The following configuration is the correct setup:

    • The current implementation of the WebLogic Server Apache plug-in does not support the use of multiple certificate files with Apache SSL.

  6. Optionally, enable HTTP tunneling for t3 or IIOP.

    1. To enable HTTP tunneling if you are using the t3 protocol and weblogic.jar, add the following Location block to the httpd.conf file:

    2. To enable HTTP tunneling if you are using the IIOP, the only protocol used by the WebLogic Server thin client, wlclient.jar, add the following Location block to the httpd.conf file:

  7. Define any additional parameters for the Apache HTTP Server plug-in.

    The Apache HTTP Server plug-in recognizes the parameters listed in Section 7.1, 'General Parameters for Web Server Plug-Ins'. To modify the behavior of your Apache HTTP Server plug-in, define these parameters either:

    • Bilbo's last song pdf free download. In a Location block, for parameters that apply to proxying by path, or

    • At global or virtual host scope, for parameters that apply to proxying by MIME type.

  8. Verify the syntax of the httpd.conf file by running the following command:

    • Windows

    • UNIX/Linux

    If the httpd.conf file contains any errors, the output of this command shows the errors; otherwise, the command returns the following:

  9. Start the Apache HTTP Server.

    • Windows

    • UNIX/Linux

  10. Send a request to http://apache-host:apache-port/mywebapp/my.jsp from the browser. Validate the response.

4.2.1.1 Placing WebLogic Properties Inside Location or VirtualHost Blocks

If you choose to not use the IfModule, you can instead directly place the WebLogic properties inside Location or VirtualHost blocks. Consider the following examples of the Location and VirtualHost blocks:

4.2.2 Including a weblogic.conf File in the httpd.conf File

If you want to keep several separate configuration files, you can define parameters in a separate configuration file called weblogic.conf file, by using the Apache HTTP Server Include directive in an IfModule block in the httpd.conf file:

The syntax of weblogic.conf files is the same as that for the httpd.conf file.

This section describes how to create weblogic.conf files, and includes sample weblogic.conf files.

4.2.2.1 Creating weblogic.conf Files

Be aware of the following when constructing a weblogic.conf file.

  • Enter each parameter on a new line. Do not put '=' between a parameter and its value. For example:

  • If a request matches both a MIME type specified in a MatchExpression in an IfModule block and a path specified in a Location block, the behavior specified by the Location block takes precedence.

  • If you use an Apache HTTP Server <VirtualHost> block, you must include all configuration parameters (MatchExpression, for example) for the virtual host within the <VirtualHost> block (see Apache Virtual Host documentation at http://httpd.apache.org/docs/vhosts/).

  • If you want to have only one log file for all the virtual hosts configured in your environment, you can achieve it using global properties. Instead of specifying the same Debug, WLLogFile and WLTempDir properties in each virtual host you can specify them just once in the <IfModule> tag.

  • Sample httpd.conf file:

  • All the requests which match /jurl/* will have Debug Level set to ALL and log messages will be logged to c:/tmp/global_proxy.log file. All the requests which match /web/* will have Debug Level set to OFF and no log messages will be logged. All the requests which match /foo/* will have Debug Level set to ERR and log messages will be logged to c:/tmp/foo_proxy.log file.

  • Oracle recommends that you use the MatchExpression statement instead of the <Files> block.

4.2.2.2 Sample weblogic.conf Configuration Files

The following examples of weblogic.conf files may be used as templates that you can modify to suit your environment and server. Lines beginning with # are comments.

In Example 4-2, the MatchExpression parameter syntax for expressing the filename pattern, the WebLogic Server host to which HTTP requests should be forwarded, and various other parameters is as follows:

The first MatchExpression parameter below specifies the filename pattern *.jsp, and then names the single WebLogicHost. The paramName=value combinations following the pipe symbol specify the port at which WebLogic Server is listening for connection requests, and also activate the Debug option. The second MatchExpression specifies the filename pattern *.http and identifies the WebLogicCluster hosts and their ports. The paramName=value combination following the pipe symbol specifies the error page for the cluster.

Example 4-2 Example Using Multiple WebLogic Clusters

Example 4-3 shows an example without WebLogic clusters.

Example 4-4 shows an example of configuring multiple name-based virtual hosts.

Apache Http Server Download

Example 4-4 Example Configuring Multiple Name-Based Virtual Hosts

You must define a unique value for ServerName or some plug-in parameters will not work as expected.

4.2.2.3 Template for the Apache HTTP Server httpd.conf File

This section contains a sample httpd.conf file for Apache 2.2. You can use this sample as a template and modify it to suit your environment and server. Lines beginning with # are comments.

Note that Apache HTTP Server is not case sensitive.

The Apache HTTP Server—known as Apache web server or simply Apache—is considered the standard for general-purpose HTTP activities and services. It offers a wide range of modules to deliver optimum flexibility in support of URL rewriting, proxy servers, and granular access management and control. Apache is a popular choice among web developers because it uses CGI, embedded interpreters, and FastCGI to support server-side scripting. This allows for the rapid and effective execution and implementation of highly dynamic coding.

There are plenty of well-known Apache alternatives—nginx, XAMPP, Caddy, and Microsoft IIS, among many others—but none of them offer the same breadth of usage provided by Apache. Apache is so widely used it has more than a 50% share in the commercial web server marketplace. It’s especially popular for use with Unix-like operating systems, although it supports most platforms. This includes Windows, OS X, OS/2, and others.

Apache http server iso

A Simple Definition of Apache
How to Set Up Apache Server
How to Set Up Apache Server in Linux
How to Set Up Apache Virtual Servers
The Best Apache Server Monitoring Tool

However, Apache’s flexibility and breadth of usage come at the expense of simplicity in many cases. The configuration structure is complex, and many of the advanced functionalities are difficult to use. This Apache server tutorial will explain the basics of Apache, providing instructions for Apache web server configuration in Linux, step by step. The aim is to help you not only set up Apache server, but also monitor it. My recommended tool for this purpose is SolarWinds® Server & Application Monitor for Apache.

A Simple Definition of Apache

Apache is a process-based, modular, open-source web server application designed to establish a new thread for each connection occurring simultaneously. Apache supports a range of functionalities, covering everything from authentication mechanisms to server-side programming languages. It also supports virtual hosting, allowing you to use one Apache web server to serve multiple websites. Most Apache capabilities are delivered as individual modules, allowing you to extend and enhance Apache’s core utilities.

How to Set Up Apache Server

You may find yourself becoming overwhelmed as you start to set up Apache server. As an open source, advanced application capable of a wide range of functions, Apache web server configuration and setup is fairly complex.

You can install and set up Apache server in two ways.

Apache Http Server Tutorial

  1. Vendor-based installation. As it’s an open source web application, anyone can make an installer to suit their individual environment. Vendors like Red Hat, SUSE, and Debian have used this capability to customize Apache server configuration and file location by taking the base operating system and other installed programs into account.
  2. Source code installation. The alternative to using a vendor-based installer is to set up Apache server by building and installing directly from the source code. This approach enables you to set up Apache server in platform-independent manner available for all operating systems.

With both installation options, modules can be compiled in the form of a dynamic shared object, or DSO. A DSO is an object file capable of being shared and utilized by numerous applications. DSO modules are separate from the core Apache file. The DSO approach to compiling modules is popular because it makes adding, updating, and removing modules easy.

How to Set Up Apache Server in Linux

This Apache server tutorial will now provide instructions for Apache web server configuration in Linux, step by step.

  1. Update your system repositories. This involves downloading the most recent version of a software by updating the Ubuntu repositories’ local package index. To do this, go to the terminal and enter the command “$ sudo apt update” into it.
  2. Install Apache by using the “apt” command. For this example, let’s use Apache2. Just input the following command— “$ sudo apt install apache2” —as sudo, which will install Apache2 and all necessary dependencies. At this stage, you may be asked whether you want to continue the installation process. Enter “Y” to indicate you would like to, and installation will begin.
  3. Verify Apache has been successfully installed. When the installation procedure has finished, check the version number to confirm Apache2 is now installed on your system. Enter “$ apache2 -version” to do this. The server version will appear, hopefully confirming Apache2 has been installed.

How to Set Up Apache Virtual Servers

When using virtual hosts, it’s important to undertake virtual server Apache configuration. Modifying configuration settings will ensure they reflect the domain specifics, which will allow Apache to respond to domain requests correctly and successfully. The process for completing virtual server Apache configuration is simple:

  1. First, input “$ sudo nano /etc/apache2/sites-available/example.com.conf” to open your virtual host configuration file.
  2. Replace “example.com” appropriately. Next, you’ll be able to modify the following:
    ServerName example.com
    ServerAdmin [email protected]
    ServerAlias www.example.com
    DocumentRoot /var/www/example.com/public_htmlAgain, be sure to replace all example components with the appropriate information. When modified, the end result should resemble the following:
    <VirtualHost *:80>
    ServerName example.com
    ServerAdmin [email protected]
    ServerAlias www.example.com
    DocumentRoot /var/www/example.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
  3. If an error occurs, reference these instructions to ensure nothing has been mistyped or inputted incorrectly.

Best Apache Server Monitoring Tool

Apache2 Http Server

Apache Http Server

After setting up Apache web server, I highly recommend the use of a monitoring tool to help you test Apache server and monitor it effectively. There are several such tools on the market, but SolarWinds Server & Application Monitor (SAM) tops my list. This tool allows you to easily define specific performance metrics to facilitate proactive monitoring of Apache Cassandra, Apache Geronimo, and Apache Tomcat. The single application is capable of monitoring and managing your entire Apache environment, and the underlying infrastructure of the server.

Apache Redirect Https To Https

With SAM, monitoring uptime and performance is easy, as is diagnosing the root of performance issues. The application facilitates proactive monitoring of all web server supporting components contributing to the Apache web server, including Linux and MySQL. Application monitoring covers the virtual layer, servers, and applications like Microsoft SQL Server, Exchange, and Active Directory. The system benefits from customizable alerts, reports, and easy-to-navigate dashboards ready to use out of the box. This means you can get up and running when SAM is installed, without having to create or modify dashboards.

The dashboards themselves have been cleverly designed, with data represented in the form of graphs and charts whenever appropriate, to give you immediate insight into key metrics and information without overloading or cluttering the interface.

SAM is a scalable and highly feature-rich application, requiring zero training or experience to start using, and is suitable for extensive enterprise-grade requirements. The user-friendly interface is one of SAM’s best features, as it makes data interpretation dynamic and accurate. This program simplifies the Apache monitoring experience, allowing you to test and interrogate it in a few simple clicks. The implementation process is simple, and SolarWinds support technicians are available on a 24/7 basis.

Apache Http Server Ssl

With the unified, centralized dashboard and ample support offered by SolarWinds, using this application couldn’t be easier. SolarWinds SAM also serves as a wider application and server monitoring solution, with its monitoring capabilities extending to Active Directory, agentless servers, application dependency, AWS, Azure IaaS, and much more. What’s great is you can download a no-risk 30-day free trial to try out the fully featured software before making a commitment.

Comments are closed.