Go to main content

Copying and Creating Package Repositories in Oracle® Solaris 11.3

Exit Print View

Updated: September 2018
 
 

Depot Server Apache Configuration

The examples in this chapter use the Apache web server as the proxy software. Activate the Apache web server by enabling the svc:/network/http:apache22 service. See Apache HTTP Server Version 2.2 Documentation for additional information.

You should be able to apply the principles shown in these examples to any proxy server software.

The Oracle Solaris 11.3 OS includes the Apache web server in the web/server/apache-22 package, which delivers a basic httpd.conf file in /etc/apache2/2.2. In general, you can use the following command to locate the httpd.conf file:

$ pkg search -Hl -o path ':file:path:*httpd.conf'
etc/apache2/2.2/httpd.conf
etc/apache2/2.2/original/httpd.conf

Required Apache Configuration Setting

If you run the package depot server behind an Apache web server instance, include the following setting in your httpd.conf file to not decode encoded forward slashes:

AllowEncodedSlashes NoDecode

Package names can contain URL encoded forward slashes because forward slashes are used to express hierarchical package names. For example, the package name pkg://solaris/developer/build/make becomes http://pkg.oracle.com/solaris/release/manifest/0/developer%2Fbuild%2Fmake to the web server. To prevent these forward slashes from being interpreted as directory delimiters, instruct Apache not to decode the %2F encoded slashes.

Omitting this setting can result in 404 Not Found errors and can very negatively impact search functionality.

Recommended Generic Apache Configuration Settings

The following settings affect performance and security.

  • Reduce the over-the-wire size of metadata.

    HTTP clients can tell the server that they accept compressed data in an HTTP request. Enabling the Apache DEFLATE filter can dramatically reduce the over-the-wire size of metadata such as catalogs and manifests. Metadata such as catalogs and manifests often compress 90%.

    AddOutputFilterByType DEFLATE text/html application/javascript text/css text/plain
  • Allow more pipelined requests.

    Increase the MaxKeepAliveRequests value to allow clients to make a larger number of pipelined requests without closing the connection.

    MaxKeepAliveRequests 10000
  • Set the maximum wait time for response.

    The proxy timeout sets how long Apache waits for the back-end depot to respond. For most operations, 30 seconds is satisfactory. Searches with a very large number of results can take significantly longer. You might want a higher timeout value to accommodate such searches.

    ProxyTimeout 30
  • Disable forward proxying.

    Make sure that forward proxying is disabled.

    ProxyRequests Off