8.10.2. Apache
8.10.2.1. General specifics
In the case of publishing a file mode of the infobase to the Apache 2.2 web server (running under Windows), it is recommended to add the following fragment to the Apache web server configuration file (httpd.conf):
<IfModule mpm_winnt_module> ThreadStackSize 8388608 </IfModule>
If problems occur during the operation of the infobase associated with the exhaustion of the stack on the web server side, it is recommended to increase the value of the ThreadStackSize parameter. For more information about the ThreadStackSize parameter: https://httpd.apache.org/docs/2.2/mod/mpm_common.html#ThreadStackSize.
When using the Apache web server version 2.2 and later, running the Linux operating system, please use the multi-process worker module. For more information about the module: https://httpd.apache.org/docs/2.2/mod/worker.html or https://httpd.apache.org/docs/2.4/mod/worker.html. If the publication serves a file version of the infobase, it is not recommended that you allow the web server to create several working processes that serve one publication. If in the infobase file mode background jobs are used, for correct operation purposes the number of working processes in the pool you use must be equal to 1. To manage the number of working processes, set ServerLimit 1 parameter in the worker module setup section (<IfModule worker.c> </IfModule> section) of the web server configuration file. If a multiprocess processing module is different from the recommended one, for settings of the number of working processes see documentation for the module you use.
8.10.2.2. Search algorithm for an installed web server
8.10.2.2.1. Apache 2.0
On Windows
- Service detection:
- An attempt is made to read registry parameter value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2\ImagePath.
- In the resulting value, the Apache2.exe fragment is replaced with conf\\httpd.conf.
- If there is a file in the path received, then the Apache web server version 2.0 is considered to be detected.
- Detecting the installation directory in the registry:
- An attempt is made to access the registry key HKEY_LOCAL_MACHINE\Software\Apache Software Foundation\Apache.
- If the attempt fails, then an attempt is made to gain access to the registry key HKEY_CURRENT_USER\Software\Apache Software Foundation\Apache.
- The open section reads the value of the 2.0\ServerRoot parameter.
- The parameter conf\httpd.conf is added to the parameter value.
- If there is a file in the path received, then the Apache web server version 2.0 is considered to be detected.
- Detection by default installation directory:
- The httpd.conf configuration file is searched for in the default installation directory: C:\Program Files\Apache Software Foundation\Apache2\conf.
- If the file is found, then the Apache web server version 2.0 is considered to be detected.
On Linux
The httpd.conf configuration file is searched for in the following directory: /etc/httpd/conf/.
8.10.2.2.2. Apache 2.2
On Windows
- Service detection:
- An attempt is made to read registry parameter value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2.2\ImagePath.
- In the resulting value, the Apache2.exe fragment is replaced with conf\\httpd.conf.
- If there is a file in the path received, then the Apache web server version 2.2 is considered to be detected.
- Detecting the installation directory in the registry:
- An attempt is made to access the registry key HKEY_LOCAL_MACHINE\Software\Apache Software Foundation\Apache.
- If the attempt fails, then an attempt is made to gain access to the registry key HKEY_CURRENT_USER\Software\Apache Software Foundation\Apache.
- The open section reads the value of the 2.2\ServerRoot parameter.
- The parameter conf\httpd.conf is added to the parameter value.
- If there is a file in the path received, then the Apache web server version 2.2 is considered to be detected.
- Detection by default installation directory:
- The httpd.conf configuration file is searched for in the default installation directory: C:\Program Files\Apache Software Foundation\Apache2.2\conf.
- If the file is found, the Apache web server version 2.2 is considered to be detected.
On Linux
The apache2.conf configuration file is searched for in the following directory: /etc/apache2/.
8.10.2.2.3. Apache 2.4
On Windows
- Service detection:
- An attempt is made to read registry parameter value HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache2.4\ImagePath.
- In the resulting value, the Apache2.exe fragment is replaced with conf\\httpd.conf.
- If there is a file in the path received, then the Apache web server version 2.4 is considered to be detected.
- Detecting the installation directory in the registry:
- An attempt is made to access the registry key HKEY_LOCAL_MACHINE\Software\Apache Software Foundation\Apache.
- If the attempt fails, then an attempt is made to gain access to the registry key HKEY_CURRENT_USER\Software\Apache Software Foundation\Apache.
- The open section reads the value of the 2.4\ServerRoot parameter.
- The parameter conf\httpd.conf is added to the parameter value.
- If there is a file in the path received, then the Apache web server version 2.4 is considered to be detected.
- Detection by default installation directory:
- The httpd.conf configuration file is searched for in the default installation directory: C:\Program Files\Apache Software Foundation\Apache2.4\conf.
- If the file is found, the Apache web server version 2.4 is considered to be detected.
On Linux
The apache2.conf configuration file is searched for in the following directory: /etc/apache2/.
8.10.2.3. Embedding Web Client
If you need to embed a web client into a website, it is recommended that you configure the X-Frame-Options response header in the required publication section of the httpd.conf web server configuration file as follows:
- If an external web site and web client are published on a single web server, make sure that a configuration file has the following strings:
LoadModule headers_module modules/mod_headers.so Header set X-Frame-Options "sameorigin"
- If an external web site and web client are published on different web servers, make sure that a configuration file has the following strings:
LoadModule headers_module modules/mod_headers.so Header set X-Frame-Options "allow-from %WebSite%"
In this expression, %WebSite% refers to a URL (protocol, domain, and port) of an external website where you plan to use the embedded web client.
- If a web client cannot be integrated with an external web site, make sure that a configuration file has the following strings:
LoadModule headers_module modules/mod_headers.so Header set X-Frame-Options "deny"
If there is not need to fine-tune the response header, make sure that none of the following exist in the configuration file:
LoadModule headers_module modules/mod_headers.so Header set X-Frame-Options "deny"
See also:
- Embedding a web client in an external web site