Hardware and software setup

Extension modules for the Apache web server. Installing Web Server Extensions Web Server Extensions Installed

In this article, I will describe in detail the process of organizing web access to 1C:Enterprise databases8.3 on the IIS web server(Internet Information Server) supplied Microsoft Windows server. For older versions of 1C:Enterprise (8.1 and 8.2 ) the algorithm for publishing databases is generally similar. The algorithm for configuring IIS for 1C:Enterprise operation will be considered, and the process of publishing databases on a web server will be described as for32-bit, and for 64-bitweb server extension module.

  1. What you need
  2. Installing the IIS Web Server
  3. Installing 1C:Enterprise components
  4. Operating system setup
  5. Publishing a database to a web server
  6. Configuring IIS to Use the 32-bit Web Server Plugin
  7. Configuring IIS to use the 64-bit Web Server Plugin
  8. Connecting to a published infobase via a web browser
  9. Connecting to a published infobase via the 1C:Enterprise client
  10. Virtual directory configuration files
    1. default.vrd file
    2. web.config file

1. What you need

  1. A computer that meets the minimum system requirements for running a web server running one of the operating systems:
    • Microsoft Windows Server 2012 (R2)
    • Microsoft Windows Server 2008 (R2)
  2. Local administrator rights on this computer.
  3. Distribution kit for installing 1C:Enterprise components. For setting up a 64-bit web server extension module, a distribution kit for installing a 64-bit 1C:Enterprise server. AT this example version used 8.3.4.389 . For older versions of 1C:Enterprise ( 8.1 and 8.2 ) the algorithm for publishing databases is generally similar.

2. Installing the IIS Web Server

Install the Internet Information Server web server, which is included by default with Microsoft Windows Server. When installing, be sure to select the components:

  • Common HTTP Features
    • Static Content
    • Default Document
    • Directory Browsing
    • HTTP Errors
  • Application Development
    • ASP.NET 3.5
    • .NET Extensibility 3.5
    • ISAPI Extensions
    • ISAPI Filters
  • Correction and diagnostics (Health and Diagnostics)
    • HTTP Logging
    • Request Monitor
  • Management Tools
    • IIS Management Console

I wrote in detail about the process of deploying the IIS web server:

  • In Microsoft Windows Server 2012 (R2) - here. IIS versions 8, after installation, you should see the Default Web Site page of the form:

  • In Microsoft Windows Server 2008 (R2) - here. IIS version 7, after installation, you should see the Default Web Site page of the form:

3. Installing the 1C:Enterprise components

On the same server where the IIS web server is deployed, install 1C:Enterprise (32-bit components), be sure to select the components during installation:

  • 1C:Enterprise
  • Web Server Extensions

If you plan to configure a 64-bit web server extension module, you must additionally run the 64-bit server installer from the corresponding 1C:Enterprise distribution and install the following component:

  • Web Server Extension Module

4. Operating system setup

Now you need to install necessary rights to key folders used for web access to 1C:Enterprise databases. For the storage directory for website files published on the web server (default C:inetpubwwwroot) you need to give full rights to the group " Users» (Users). In principle, this step can be skipped, but then to publish or modify the publication of the database, you will need to run 1C:Enterprise as an administrator. To configure the security of this directory, click on it right click mouse and select " Properties» (Properties).

In the properties window that opens, go to the tab " Security» (Security) and press the button « Change» (Edit…), to change the current permissions. The permissions window for this directory will appear. In the list of Groups or users (Groups or user names) select the group " Users" (Users) and in the list of permissions for the selected group, set the flag " full access» (Full control). Then press " Apply" (Apply) to save the changes and close all windows using the button " OK».

Next, you need to give full rights to the directory with installed files 1C:Enterprise (by default C:Program Files (x86)1cv8 for 32-bit expansion module and C:Program Files1cv8 for 64-bit) group IIS_IUSRS. To do this, we perform the same actions as described above, with the only difference that in order for the required group to appear in the list " Groups or Users” (Groups or user names), you must click the button located under the list “ Add" (Add..), and in the window for selecting groups or users, click " Additionally» (Advanced…).

Then click on the button on the right Search"(Find Now), then select the desired group IIS_IUSRS in the search results table and click " OK».

Group IIS_IUSRS will appear in the list of groups or users. Give it full rights to the selected directory and click " Apply» (Apply) to save the changes.

And finally, if the publication is performed for the file base, you must also give the group IIS_IUSRS full rights to the directory containing the files of this infobase.

5. Publishing the database on the web server

We proceed to the direct publication of the database on the web server. To do this, launch 1C:Enterprise in the Configurator mode for the database that you want to publish. Then select " Administration» - « Publishing to a web server...»

The window for setting the properties of the publication on the web server will open. The main fields required for publication are already filled in by default:

  • Virtual directory name - the name by which the database will be accessed on the web server. Can only contain Latin characters.
  • Web server - selected from the list of web servers found on the current computer. In our case, this is Internet Information Services.
  • Catalog - physical location directory where the files will be located virtual application.
  • The corresponding flags can specify the types of clients to publish, as well as indicate the possibility of publishing Web services. In the table below, you can edit the list of Web services that will be published, as well as in the column " The address» change the synonym by which this Web service will be accessed.
  • Also, for the IIS web server, it is possible to indicate the need to perform authentication on the web server using OS tools by setting the appropriate flag.

By choosing necessary settings publications click " Publish».

If the publication went without errors, we will see a corresponding message.

Publishing to the IIS web server is always done for the default website and for the default application pool. It is worth bearing in mind that when publishing from the configurator, the 32-bit web server extension module will be registered, and the default application pool will be DefaultAppPool- works only with 64-bit applications without configuration. Accordingly, further actions depend on the bitness of the web server expansion module that you plan to use. For a 32-bit web server plug-in, you must allow the application pool to use 32-bit applications, or register a 64-bit web server plug-in. This will be discussed below.

6. Configure IIS to use the 32-bit Web Server Plugin

Facilities» (Tools) - « IIS Manager

Default Web Site- a virtual directory converted into an application appeared with the name that we set when publishing the database. All that's left to complete the publishing is to allow 32-bit applications for the default application pool. To do this, in the connection tree, go to the " Application pools» (Application Pools).

In the list of application pools, find a pool with the name DefaultAppPool. Right-click on it and select " Extra options» (Advanced Settings).

In the application pool settings window that opens, in the " General» (General) find the item « 32-bit applications allowed» (Enable 32-Bit Applications) and set the value of the parameter to True. Then save the changes by clicking " OK».

7. Configure IIS to use the 64-bit Web Server Plugin

You can register a 64-bit web server extension module using the utility webinst.exe the corresponding version located in the directory bin, directory with installed program 1C:Enterprise, or use the method below.

Launch Internet Information Services (IIS) Manager. You can do this from the Server Manager by selecting the menu item " Facilities» (Tools) - « IIS Manager» (Internet Information Services (IIS) Manager).

Here, expanding the tree in the connections window, we will see that for the default website - Default Web Site- a virtual directory converted into an application appeared with the name that we set when publishing the database. To complete the publication, it remains only to specify this application use a 64-bit request handler. To do this, open the handler mapping settings page for this virtual directory by selecting the " Handler Mapping» (Handler Mappings) on home page applications.

Find the handler in the handler mapping table "1C Web Service Extension". Let's open given handler by double-clicking on the corresponding line in the table.

Let's edit the handler, replacing the path to the executable dll of the 32-bit web server extension module that is selected in this moment, to the path to the 64-bit version of the library. In this example, change the path c " C:Program Files (x86)1cv88.3.4.389binwsisapi.dll" on the " C:Program Files1cv88.3.4.389binwsisapi.dll» using the select button. After changing the path, press " OK» to save changes.

8. Connecting to a published infobase via a web browser

Well, that's all. For connections to a newly published database, run Internet Explorer, and in the address bar enter the path of the form http://localhost/<Имя публикации информационной базы> . In this example, this is http://localhost/DemoAccounting/.

You can also connect to this infobase from any computer on the network by accessing the web server via its internal (or if the port 80 , by external) IP address.

In this case, for 1C:Enterprise to work correctly, the name of the domain to which the call is made (or IP address) must be added to Internet Explorer's trusted sites, and pop-up windows must be allowed for it. More about Internet setup Explorer for the 1C:Enterprise web client, read here.

9. Connecting to a published infobase through the 1C:Enterprise client

You can also connect to an infobase published on a web server using the 1C:Enterprise thin client. To connect, open the 1C:Enterprise launch window and click the " Add» to add an infobase.

In the window for adding an infobase/group, set the switch to " Adding an existing infobase to the list» and press « Further».

Enter the name of the database as it will be displayed in the list of infobases (must be unique for this list), select the location type " On the web server» and press « Further».

Enter the address string to connect to the infobase (without the /ru_RU/ prefix). You can also specify the proxy server settings (if any) and the method of authentication on the web server here. Having specified the necessary settings, click again " Further».

Specify launch parameters for the infobase and click " Ready» to complete the wizard.

After that, this infobase will appear in the list of databases in the 1C:Enterprise launch window. Please note that the launch mode Configurator is not available for of this type connections. Press " 1C:Enterprise» to connect to the infobase.

10. Virtual directory configuration files

Let's take a closer look at the structure of the files that were created during the publishing process. If web access to the published infobase does not work for some reason, the configuration files can be edited manually to achieve the desired result (configuration files from this article for the 64-bit web server extension module can be downloaded here).

Let's go to the directory that we specified during the publication of the database. We will see two files in it:

  • default.vrd
  • web.config

Both files are viewable and editable using any text editor, such as Notepad. Let's take a closer look at the structure of these files.

10.1. default.vrd file

In file default.vrd describes published Web services (element ), as well as the name of the virtual application (attribute base) and a connection string to the 1C:Enterprise infobase (attribute ib). In this example, for a file infobase, the connection string will be as follows:

Ib="File="C:1C_BASEDemoAccounting";"

As you can see from the example, if there are characters in the connection string that are invalid according to the XML standard (http://www.w3.org/TR/xml11/), they must be replaced accordingly.

You can specify the username and password in the connection string. In this case, the connection to the infobase will be performed on behalf of the specified user. For example, to connect as a Seller user, the connection string would be:

Ib="File="C:1C_BASEDemoAccounting";Usr=Seller;Pwd=123;"

For a server infobase, the connection string will look like this:

Ib="Srvr="WIN2012;Ref=Accounting;"

Where WIN2012- the name of the 1C:Enterprise server cluster, and Accounting- the name of the database in the cluster.

More about the structure given file can be read in the Administrator's Guide 2nd Edition, Appendix 2, Chapter 3.12.

10.2. web.config file

File web.config is a file that defines options for an ASP.NET web application. Every web application should have a file web.config located in its root directory. Our virtual directory is no exception. The current file contains data about the 1C Web-service Extension handler that processes requests to this application. The handler is configured in such a way that all requests are passed to the library wsisapi.dll located in the directory bin, directory with 1C:Enterprise files. If server infobases are used, the version of the library must match the version of the 1C:Enterprise server cluster.

You can find this handler (or add it if it doesn't exist) in the Internet Information Services (IIS) Manager. To do this, select the tab with the current application and in the properties window select the item " Handler Mappings» (Handler Mappings).

In the handler mapping table, we will see our handler "1C Web Service Extension". If there is no such handler in the list, it should be added by selecting in the window « Actions» (Actions) item « Adding a wildcard script match» (Add Wildcard Script Map…).

When adding, enter the name of the handler and specify the path to the file wsisapi.dll. These parameters can also be changed for the current handler by selecting the item " Change…» (Edit…) in the action list window.

You also need to make sure that the flag is set for the handler " Performance» (Execute) in the function permission change window. You can open this window by selecting " Change feature permissions...» (Edit Feature Permissions…) in the window « Actions» (Actions).

Reduce as much as possible system requirements to user machines and make full use of the possibilities implemented in you by publishing 1C on a web server. This will allow you to organize work with the database not only using thin client, but also using any browser, without installing additional components and applications.

Primary requirements

The minimum system requirements for the back-end architecture can vary considerably and are highly dependent on:

  1. Tasks solved by the program;
  2. Intensity of document flow;
  3. The number of simultaneously connected users;
  4. The size and number of published and registered databases.

However, it is simply impossible to do without two things when publishing 1C on a web server:

  • Web server deployed in the system;
  • An installed and running expansion module supplied by 1C.

Web server

This element of our structure can be either the Internet Information Server (IIS), supplied as part of operating systems from Microsoft, or the Apache server. Of course, there are also paid analogues of these solutions, but we will not talk about them.

An additional advantage of Apache products is the ability to run them from Linux-like operating systems.

We will consider the option with IIS, because. it does not require searching and installing third-party products.

Web Server Extensions

These modules can be installed by running the platform distribution file. Reaching the window appearance which is shown in Fig.1, you must activate the installation of the corresponding component.

Naturally, in addition to extensions, the 1C Enterprise platform itself must be installed on the computer, in otherwise we will not have access to the Configurator, through which the main part of the publication is performed.

Having decided on the tools, let's move on to the configuration.

Installing and Starting the Web Server

To run IIS on a computer with installed Windows, it is necessary to perform the following sequence of actions (on Windows example 7):


Fig.3

You can make sure that the web server is running by typing in address bar any browser with a string like "http://localhost" and getting a picture, as in Fig.4.

Fig.4


Fig.6.

In some cases (in particular, if the program is running in a 64-bit operating system), after publishing the database on the server, you may have to adjust the work with the libraries used by the 1C platform. This can be done from the "Sites" submenu.

Having selected a specific, just published base in the list, you need to activate the "Handler Mapping" utility (Fig. 7).
Fig.7

In our case, we need to establish a correspondence between ISAPI-dll and the wsisapi.dll executable file located in the BIN folder, installed version platforms.

In principle, on this the main part of the work with the server can be considered completed, we proceed directly to the publication of the database.

Publishing the database to the server

Setting user rights

Having received the above window, we move on to setting up access rules for users.

We need to allow full access IIS_USERS user:

  • To the folder "C:\inetpub\wwwroot\Publication name" where the resource is stored;
  • To the folder with the version of the program used, where the wsisapi.dll library is stored;
  • To the place where the base is stored.

Having completed the above steps, we can check the performance of our publication by typing in the browser window a line like “localhoct / Publication name” and finding a user identification form there.

The task is to raise the IIS web server built into windows and publish the 1c base on the 8.3 platform on it. There is nothing difficult in this.

Available spinning on a virtualka 2008 r2 enterprise server. Local administrator rights to it. Platform 1C 8.3.6.2041. Information base let's create an empty one. And so let's get started. Join our VK group! Under repair! Smart Workshop!

Installing the Web Server Role (IIS)

First you need to install the web server role. We open Server Manager, select the branch on the left Roles, right click Add role.

We reach the step of selecting the Server Role and check the box next to Web Server (IIS). Click next. Now you need to correctly select the services of the role to be installed. Put the checkboxes exactly as in the screenshot below.

We complete the installation. The Add Roles Wizard should certain time tell us that the role and all role services installed successfully:

Now we need to check if everything worked out well for us. Open any browser and go to the address http://localhost. We should see such a joyful picture:


installation of the platform and components 1s

This means that the web server has risen correctly and everything is working fine. So let's move on to 1s. You need to set up a platform. The only caveat when installing the platform is to choose:

  • 1C:Enterprise
  • Web Server Extensions
setting access rights

The first step is to set the permissions for the folder where we have the root directory of the web server. If nothing has been changed, then by default it is C:\inetpub\wwwroot. Go to folder C:\inetpub\ choose a folder wwwroot, right click on it and go to properties. Go to tab Security. By clicking on the change button, we go directly to setting permissions. Find in the list Groups and Users, group Users, and by clicking on it we put in the column below Group Permissions, missing ticks in the column allow.

Now you need to give permissions to folders with 1s installed. Let's move on to them, by default for the 32-bit version 1c is in the folder C:\Program Files (x86)\1cv8 for 64-bit in a folder C:\Program Files\1cv8. Also choose a folder 1cv8 go to its properties, go to the tab Security -> Edit. But instead of selecting a group from the list, we need to add it there first. To do this, click the button Add, in the window that appears, press the button Additionally.


Next, click on the button Search and in the result list we are looking for IIS_IUSRS, adding it with a double click, returns us to the window Select "Users" or "Groups" but with an already marked group in the list. Click OK, and back to the window Group Permissions put all the checkmarks in the allow field for the newly added group.

Having set permissions for folders with files 1c, we are left with the last one. Give rights to a group IIS_IUSRS on the folder where we have the base 1c itself.

The necessary preparations have been made. Now let's move on to publishing.

Publication 1s on a web server

It is necessary to start 1s in the configurator mode by selecting the database you need to publish. In my case, this is an empty base and there is only one.

In the 1s configurator mode, go to the menu Administration -> Publishing to a web server.


After looking at the parameters and making sure that, in essence, everything suits us, we press Publish. If your publication went through without errors, go to the last step.

configuring IIS to work with a 32-bit 1C web server extension module

Let me remind you that we used a 32-bit platform and a web server extension module from 1c, respectively. Therefore, in this case, we still need to allow the default application pool to execute - DefaultAppPool run 32-bit applications. This is not difficult to do. Let's go Server Manager -> Roles -> Web Server(IIS) -> Service Manager(IIS) -> Application pools -> DefaultAppPool. Right mouse button on DefaultAppPool call context menu and choose in it Extra options.


We are looking for a line 32-bit applications allowed and put opposite TRUE

CONFIGURING IIS TO WORK WITH A 64-BIT 1C WEB SERVER EXPANSION MODULE

If we used a 64-bit platform and a web extension module, respectively, then we need to do the following manipulations:

Let's go Server Manager -> Roles -> Web Server(IIS) -> Service Manager(IIS)-> And select the application converted from the virtual directory with the name that we set when publishing the database. In the right field, go to the section Handler Mappings. Publishing 1s 8.3 on the iis web server Publishing 1s 8.3 on the iis web server

Join our VK group!

If you have already read the introductory material about the Apache server and the article describing the differences between different versions, installed and produced initial setup server, then you can proceed to consider modular system Apache. The fact is that this web server, in fact, consists of one mandatory module - the core (Apache Core), which performs the simplest tasks of the server. All other functions are described in additional modules. In this article, we will look at some Apache modules, both commonly used and little-known to web developers.

The advantage of this structure is that you can enable and disable additional modules at any time, using exactly the server configuration that is needed to perform your tasks. Thus, Apache will take up exactly as much space as it needs to work, and "extra" functions will not load the server's memory, increasing the overall system performance.

The Apache kernel performs the most basic server functions and allows you to connect additional modules

You need to start talking about modules, of course, from the core of the system. It is to it that all additional modules adjoin, like pine nut grains to the core. The kernel performs those functions without which Apache simply could not be called a web server. It regularly accepts browser requests, returns responses to them in the form of pages, and so on, but most importantly, it allows you to connect additional modules to itself.

The delivery of the server includes a whole set of modules designed to work in the mode with several running processes. It's no secret that most existing operating systems allow you to work with several tasks at the same time. Thanks to this group of modules, Apache can use all the features of such systems. In addition to the main mpm_common module, you can find a module optimized for each of the most popular platforms (Windows, OS/2, BeOS, Netware, and so on).

If you want to use all the .htaccess files, then you should install the mod_access module, which is responsible for accessing directories and files on the server. With it, you can deny or, on the contrary, allow access from certain IP addresses or networks.

The mod_actions model allows you to run scripts while accessing a specific file type

The mod_actions module contains two directives for running CGI scripts. "Actions" is responsible for launching executable file when the user requests a file of a particular type. Thus, it is possible, for example, to organize the processing of images before sending them to the user or maintaining statistics. The second directive - "Script" - allows the program to be executed when a file is requested using a specific method (GET, POST, or some other special one). With its help, you can install a universal form handler that will perform, in addition to standard actions, the ones you need. This can be data processing before entering it into the database, sending it by mail, maintaining statistics, and so on.

The mod_alias module is responsible for redirecting and creating aliases

If you need to use the redirection or aliasing functions, then you can't do without the mod_alias module. It contains directives that allow you to associate an alias with a specific directory. For example, your directory with pictures looks like this: /pub/we/images/, that is, there is access to it, but through HTTP protocol it is not available. If you don't want to move it for some reason, you can make an alias: "Alias ​​/img /pub/we/images". After that, users typing in their browsers the address http://your_site/img/ will be taken to the desired directory with images. By the way, this redirection is used for a directory with CGI scripts.

Using the mod_asis module, you can issue the page "as is" to the client, without processing by the server

Another interesting, but not very often used by webmasters module is mod_asis , which allows you to "give" some files to the client without processing by the server. For this in configuration file you need to add the line "AddHandler send-as-is asis", where "asis" is the file extension. Now, when the browser requests a file with this extension from the server, it will get to it directly. Apache will only add the "Server" and "Date" identifiers to the header, everything else - for example, the status - will be sent "as is".

Modules from the mod_auth family are responsible for user authentication

A number of modules are designed to authenticate users on the site. This is understandable, because the problem of security and access control is quite acute. We will describe only those modules that are included in the standard distribution of the Apache server, but we note that third-party manufacturers have created quite a lot of other modules that you can also try to connect and use on your own.

Another type of authentication is digital ( HTTP Digest Authentication), which supports data encryption with an MD5 key and is considered more secure than the basic one. Apache has a mod_auth_digest module that allows you to use it. For you, setting up such authorization will not differ practically in anything from the previous case. You will only need to use the htdigest utility to create the files. In general, the topic of user authentication when creating Internet sites is very voluminous and interesting. It deserves a separate material, but here we only tried to describe the main features of the Apache server in this area.

Functions from the mod_autoindex module allow you to automatically create index files

The mod_autoindex module is intended for automatic generation of index files. This can be very handy if you've created a file archive and you just need to put the names of the files on the index page. You do not have to create them manually, just use the appropriate directives. With their help, you can sort files, add different types files with their own icons, show or hide files with specified extensions, and so on.

Using the functions from the mod_deflate module, you can compress files before sending them to the user to speed up loading

To take advantage of pre-compression text files from your server, you need to install the mod_deflate module. It will enable packaging of outgoing files before sending them to users. After receiving, the browser itself will unpack the file and show it to the visitor. This will allow you to reduce outgoing traffic, speed up the download of files from the server and improve the user experience of your site. The documentation for the server provides good example recommended configuration - it will allow you to avoid trouble if the user has old browser, which does not support packing capabilities, and therefore we will not present it here.

The mod_status module allows the administrator to monitor the health of the server without additional programs. The system itself will write to the file all requests received on it, the time of server reboots and shutdowns, the load of the computer's processor, and other information. To do this, in addition to installing the module, you need to create a directive in the httpd.conf file:


SetHandler server-status

Order Deny,Allow
Deny from all
Allow from .foo.com

In this case, at http://your_site/server-status you can look at the server statistics. It will only be available if you sign in from a computer in the .foo.com domain. However, you can set other access restrictions as well.

And the last module I would like to talk about will allow you to turn your web server into a proxy server. This is done by connecting the mod_proxy module and other modules of this "family" to Apache. Apache can operate in two proxy modes: forward and reverse. Direct mode requires special customization visitor's browser and allows, for example, users local network access the Internet. Reverse is none advanced settings does not require and provides access to computers that are not visible "from the outside". A typical example is the access of Internet users to any site located inside the local network.

By the way, Apache allows you to organize not only HTTP, but also FTP proxies with similar functions. In addition, a developed system of directives makes it possible to finely delimit network access rights, allow or prohibit the acceptance of certain types of files, and so on.

Of course, we failed to cover all possible Apache modules within one material, even there are too many standard ones. But, on the other hand, it does not make much sense to talk about all of them, because some of them are very well known to web developers, and the other part is needed only by a very narrow circle of people. We tried to talk mainly about the modules needed by many, the existence of which is not known to everyone.

Liked the article? Share with friends!
Was this article helpful?
Yes
Not
Thanks for your feedback!
Something went wrong and your vote was not counted.
Thank you. Your message has been sent
Did you find an error in the text?
Select it, click Ctrl+Enter and we'll fix it!