8.3.3. Webinst utility
8.3.3.1. General description
The utility is designed to configure web servers to support the web client operation. The utility can be used in Windows or Linux environment. It is part of the 1C:Enterprise distribution package.
webinst [-publish] | -delete <web server> -wsdir <virtual directory> -dir <physical directory> -connstr <connection string> -confpath <path to httpd.conf> -descriptor <path to default.vrd> [-osauth]
IMPORTANT. The name and value of the parameter must be space-separated. If the parameter contains spaces, it must be enclosed in quotation marks ("). If there is a quotation mark inside the parameter, the internal quotation marks must be doubled.
IMPORTANT. When starting the utility, you can specify only one of the following parameters: iis, apache2, apache22, or apache24.
IMPORTANT. To perform the publication, run the utility as an administrator. When running on Windows, a request for elevation of privileges will appear.
-publish by default
The web client is published to the web server.
-delete
The publication is deleted from the specified directory.
NOTE. When deleting a publication, it is sufficient to specify only the -wsdir parameter. The remaining parameters can be specified to control the operation.
<web server>
Specifies web server the action (publish or delete publication) will be performed for:
- -iis . A web server of Microsoft Internet Information Services versions 5.1, 6.0, 7.x, 8.x, 10.0 (only when used with Windows OS).
- -apache2. Apache 2.0 web server.
- -apache22 . Apache 2.2 web server.
- -apache24. Apache 2.4 web server.
When using the Apache 2.4 web server, you can omit the path to the configuration file using the -confpath parameter.
It should be considered that for the Apache web server version 2.2 and 2.4 there are differences between the changes made in the configuration file of the web server. Therefore, the incorrectly specified version of the web server will result in the unavailability of the publication.
-wsdir
Name of the virtual directory.
-dir
Name of the physical directory where the virtual directory of the web server will be displayed. The directory must already exist.
For IIS 7.x and later web servers, publishing is not supported if the value of this parameter points to the %SYSTEMDRIVE%\Inetpub\wwwroot directory.
NOTE. A directory name must not end with a "\" symbol if it is enclosed in quotes. Correct: "c:\my path", incorrect: "c:\my path\".
-connstr
Infobase connection string.
-confpath only for Apache
The full path to the configuration file (httpd.conf) of the Apache web server. This parameter is applicable only when using Apache web servers.
-descriptor
Allows you to publish according to the template specified by the existing file, which is specified in this parameter (including the file path). The name of the template file does not have to be default.vrd. When publishing, the existing default.vrd file is completely replaced with the template file. If the -wsdir or -connstr parameters are specified simultaneously with this parameter, then the values of these parameters replace the values of the base and ib (respectively) attributes of the point element.
If the -descriptor parameter is specified simultaneously with the -delete parameter, then the virtual directory name (the base attribute of the point element) and the infobase connection string (the ib attribute of the point element) are used from the template file. The publication will be deleted only if both values in the publication to delete and the template file match.
-osauth only for IIS
When publishing, it configures the use of OS authentication on a web server. This parameter is applicable only when using IIS web servers.
8.3.3.2. Publication examples
Example of publish command for IIS 7.0 and later:
webinst -publish -iis -wsdir demo -dir "c:\inetpub\demo" -connstr "Srvr=server:1741;Ref=demo;"
In this example, a web client with the following parameters is published:
- Virtual directory: demo (the -wsdir demo parameter).
- Physical directory where the virtual directory is displayed: C:\inetpub\demo (the -dir "c:\inetpub\demo" parameter).
- Infobase connection string: Srvr=server:1741;Ref=demo; (the -connstr "Srvr=server:1741;Ref=demo;" parameter, an infobase in client/server mode).
Example of publish command for Apache 2.2:
webinst -publish -apache22 -wsdir DemoWS -dir "c:\apache.www\demows" -connstr "File=""c:\my db\demows"";" -confpath "C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf"
In this example, a web client with the following parameters is published:
- Virtual directory: DemoWS (the -wsdir demoWS parameter).
- Physical directory where the virtual directory is displayed: C:\apache.www\demows (the -dir "c:\apache.www\demows" parameter).
- Infobase connection string: File="c:\my db\demows"; (the -connstr "File=""c:\my db\demows"";" parameter, an infobase in file mode).
- Apache web server configuration file: C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf (the -confpath "C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf" parameter).
Example of publishing using a template file:
webinst -publish -iis -wsdir demoMA -dir "c:\inetpub\wwwroot\demoMA" -connstr "Srvr=server:1741;Ref=demo;" -descriptor template.vrd
In this example:
- Publication to IIS web server (-publish -iis parameters) is performed.
- Virtual directory: demoMA (the -wsdir demoMA parameter).
- Physical directory where the virtual directory is displayed: c:\inetpub\wwwroot\demoMA (the -dir "c:\inetpub\wwwroot\demoMA" parameter).
- Infobase connection string Srvr=server:1741;Ref=demo; (-connstr "Srvr=server:1741;Ref=demo;")
- The remaining publication parameters will be obtained from the template.vrd template file (-descriptor template.vrd parameter).
Example of a command for deleting a publication for IIS:
webinst -delete -iis -wsdir DemoWS
In this example, the publication made in the virtual directory is deleted:
- Virtual directory: DemoWS (the -wsdir DemoWS parameter). The remaining parameters are automatically determined from this name.