To use Embedded HTML, you must have the following in place:
Apache server:
You need to configure the server as shown below. This example was created with Apache 2.4.
LoadModule cgi_module modules/mod_cgi.so
LoadModule env_module modules/mod_env.so
<IfModule alias_module>
ScriptAlias /cgi-bin/ "${SRVROOT}/cgi-bin/"
</IfModule>
<Directory "${SRVROOT}/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
SetEnv MFCES_INIT_LOCATION "c:\programdata\micro focus\ces.ini"
IIS server:
The following instructions use Information Services Manager (IIS) 10.0 and Windows 10.
You can deploy in the default location for IIS, C:\inetpub\wwwroot\cgi-bin. Alternatively, you can configure your project to create a site directory structure, and then configure your IIS server to use that location. See Deploying a CGI Application with Embedded HTML and the CGI samples available with Samples Browser.
Unrestricted CGI application present a security risk to your system. Because of this, you need to configure IIS to enable CGI programs to execute. IIS runs under a special user name IUSR and you need to grant this user permissions to the site directory structure.
IIS must be enabled in your Windows system - see the Microsoft documentation for instructions. You need to manually enable CGI support as follows:
To configure IIS to use a non-default installation location for the executables:
You also need to configure some IIS security features to enable CGI programs to execute in the site directory structure:
IUSR now appears in the Security pane with the following permissions enabled - Read and & execute, List folder contents, and Read.
You should now be able to debug your CGI application from the Visual Studio solution.
You also need to enable the IIS web.config file in your site to work. The file controls the actions allowed by the web server on the directory.
%windir%\system32\inetsrv\appcmd.exe unlock config /section:system.webServer/handlers
You should receive the following message: Unlocked section "system.webServer/handlers" at configuration path "MACHINE/WEBROOT/APPHOST".