Fine-tuning Apache 2.4 for 1s 8.3. Performing Apache and IIS publishing. Publication of the information base

1. Download APACHE web server

there select Binaries - Win32 folder - file httpd-2.2.25-win32-x86-no_ssl.msi - if installation is on Windows) and install.

Customize and rewrite APACHE files no need (click "Next" everywhere). After installation, it will appear and launch in the system icons. In the next window at the top you can enter any information, this does not affect the performance.

2. After installation, check the functionality of the web server. When you go to the address in your browser http://localhost The following window should be displayed:

3. If, when installing the 1C platform, components for working with the web server were not installed, they must be installed (via platform installation):

4. Next, go to “Configurator” - “Administration” - “Publishing on a web server...”. It is necessary to indicate the name of the database in English letters in the "Name" field. Select an empty directory (the path to it should not contain Russian characters, see example below).

Set the "Publish Web services" flag, and in the list of web services, check the box next to the desired service.

After completing these steps, you can check the availability of the 1C web service by entering in the browser:

computer ip/BaseName/ws/Alias ​​specified during publication.1cws?wsdl. This should open an XML description of the properties and methods of the web service (not an error page)

According to the picture, the address will look like this:

Step-by-step instructions for setting up web services for 1Cv8 and IIS

1. IIS installation is in progress standard means. The following components must be installed:

Web Management Tools:

IIS 6 Scripting Tools

IIS 6 WMI Compatibility

IIS Metabase and IIS configuration compatibility

IIS Management Console

IIS Management Scripts and Tools

World Wide Web Services:

ISAPI Extensions

Default Document

Directory Browsing

Static Content Compression

Request Filtering

A set of sufficient components is shown in the screenshot below.


2. If, when installing the 1C platform, components for working with the web server were not installed, they must be installed (via platform installation):

Next, go to “Configurator” - “Administration” - “Publishing on a web server...”. It is necessary to indicate the name of the database in English letters in the "Name" field. Select an empty directory (the path to it should not contain Russian characters, see example below). Check the box "Publish Web services", in the list of web services check the box for the service "rg1CTCService". Click "Publish".

In the dialog about restarting the web server, click "yes".

For correct installation, the user must have administrator rights on the computer from which the installation is performed.

3. Specify rights for the 1C web services processor. Rights to run (Execute) modules are added for the IIS_IUSRS group to the folder...1cv81\BIN\

4. If the database is file-based, you need to add Modify rights to the folder and subfolders of the database for the same group.

5. In the IIS console. Right-click on the line with the folder we created. Let's convert it into an application.


6. Add settings for processing 1C files. On the Handler Mappings tab, add scripts (not scripts with an asterisk) for the extension - "*.1cws".

Any name.

Request Restrictions -> Access -> Script or Execute.

7. For handlers, you need to specify additional parameters (Edit Feature Permission). Set flags for launching scripts and applications.

8. Check the presence of a 1C web services processor on the ISAPI and CGI Restrictions tab for the server.

If the installation is in a 64-bit environment, then for the handler you need to enable the Alpplication Pool -> DefaultAppPool -> Enable 32-bit Application -> True mode.

9.. To check the correct execution, contact the IP computer address/DatabaseName/ws/Alias_specified_at_publication.1cws?wsdl.

This should open an XML description of the properties and methods of the web service (not an error page)

In accordance with the screenshot of point 2, the address will look like this: http: //ip/IB/ws/WSName.1cws?wsdl

"can operate in three modes:

  • Thick client mode
  • Thin Client mode
  • "Web client" mode

In this article we will look at installing the EDMS "Document Flow Prof" on a corporate Apache web server(distributed free of charge) and launch the system in web client.
After installing and configuring the Apache web server, users
will be able to access the document management system database through one of
the following web browsers:

  • Mozilla FireFox
  • Microsoft Explorer
  • Google Chrome
  • Opera
  • Safari

Let us immediately note that the material of this article
can be used not only for deployment on a corporate
web server of our document management system, but also for deployment
other "1C" configurations, for example, "1C: Management of a small company",
"1C: Trade Management", "1C: Document Flow", "1C: Management
production enterprise" and others that can operate in the mode
controlled forms 8.2.

Installing Apache

Apache web server is free
distributed software(nevertheless having its own
licenses that must be followed) and can be freely downloaded from
official website http://httpd.apache.org.
You can download any version, no lower than 2.2.16. Before downloading
select your server's operating system (Unix or Windows).


Developers of 1C configurations for
developing and testing their configurations in web mode can also
install Apache on your local computer, Apache is allowed to run
on Windows 7 and Windows XP, when installed on a local computer
developer, you can choose to install for one user (the current
user), in this case access to the web server will be carried out
not via standard port 80, but via port 8080.


Procedure Apache installations quite simple.After
downloading a small distribution (5.2 MB) in MSI format (usually a file
has a name like "httpd-2.2.16-win32-x86-no_ssl.msi") of the web server
unpack the distribution package and run the "setup.exe" file.



click on the picture to enlarge


After installation starts, fill out
your web server settings. Please enter your email address
system administrator, in the Network Domain, Server Name fields, specify
the names of your servers, unless you plan to configure the server for
access from external networks, you can specify arbitrary names, for example
myServer, 1c_doc, etc.



After entering the parameters, click "Next"
and wait for the installation to complete. Apache web server status in the system
Windows is displayed in the system window next to the clock, the presence of green
triangle indicates that the server is running and working correctly.



You can open Apache Monitor by clicking right using the mouse button on the icon shown in the top figure.



Usually no additional settings
Apache in Windows system we don’t have to do this, EDMS configuration
"Document flow Prof" will be published on the web server automatically,
from the configurator "1C:Enterprise 8.2".

Setting up 1C:Enterprise 8.2

To enable the ability to work with
configuration in web client mode and use all the features
managed forms version 8.2 we need to publish
(export) the configuration to a web server. To publish the configuration
to the web server, you need to open the database in the "Configurator" mode and in
In the "Administration" menu, select "Publish on a web server."



In the window that opens, enter:

  • Name - the name of your database in Latin letters. Given name will
    used by users in web browsers when users type
    URLs, for example by entering the name cfg82_doc, for the localhost web server,
    users will need a database address like http://localhost/cfg82_doc . The name must follow URL standards (RFC 1738 standard).
  • Web Server - Select Apache 2.2
  • Catalog - a place for the physical location of published
    system files in your web server directory, for example
    C:\apache_ws\doc_prof\

After entering the name and directory, click the "Publish" button. After
After publishing, you can open your web browser and enter the address of your
published database. Everything should work. If they do
problems are observed, check the httpd.conf file from the web server directory
(default installation directory "C:\Program Files\Apache Software
Foundation\Apache2.2\conf"). The httpd.conf file should contain the lines
indicating the use of Apache with 1C:Enterprise 8.2, an example is this
lines:



LoadModule _1cws_module "C:/Program Files/1cv82/8.2.12.75/bin/wsap22.dll"


If there is no line, try creating it manually (after making
a copy of the httpd.conf file), indicating in the line the path to the wsap22.dll library
your 1C platform. It is recommended to use the 1C platform version below
8.2.12. In some cases, it helps to deploy a web server not in
default directory "Program files", to some other directory of your
server or workstation. Also, in the Apache configuration file
There should be a section with information about the published database.
For example, like this:



#1c publication
Alias ​​"/cfg82_prof" "C:/apache_ws/doc_prof/"

AllowOverride None
Options None
Order allow,deny
Allow from all
SetHandler 1c-application
ManagedApplicationDescriptor "C:/apache_ws/doc_prof/default.vrd"


After entering the address, a window for user authentication will open.
Select your name and enter your password. In the picture below, like at all
the rest shows examples of launching the "Document Flow Prof" platform 8.2 in
FireFox web browser.





The figure below shows an example of how the 1C configuration works in managed forms mode in a browser window.



Working in the web client is practically no different from working with managed forms in the thin and web clients.


2010. Rusakov Grigory. The article was written for the website www.documentflow.net, reprinting and copying is permitted with the obligatory indication of a link to the website http://www.documentflow.net and the author.

*Attention, if you do not have a dedicated server for 1C, and your site runs on regular hosting (without a dedicated server), then you will not be able to configure the web client using this method. This article discusses the case when the 1C platform is installed on a dedicated server, and the site runs on it. In the near future, another article will be written about ways to configure a web client in conditions different from those described.

Setting up on the 1C: Enterprise side:

  1. We go to the configurator of the configuration we need 1C 8.2
  2. Administration - Publishing to a web server
  • Name - This is the string you will write in address bar after the site name (In our case "sb" -> )
  • Web server - this parameter determines the server (In our case, Apache 2.2)
  • Directory - Path to the folder in the root directory of the site for placement configuration file 1C
  • Check the box "publish" thin client and web client"
  • Click "Publish"

Settings on the Apache side:

Opening httpd.conf and we see that 1C has made changes to it. There are not many changes, here they are:

LoadModule _1cws_module "C:/Program Files/1cv82/8.2.13.205/bin/wsap22.dll" #1c publication Alias ​​"/sb" "C:/Apache2.2/htdocs/sb/" AllowOverride None Options None Order allow,deny Allow from all SetHandler 1c-application ManagedApplicationDescriptor "C:/Apache2.2/htdocs/sb/default.vrd"

In principle, everything here is correct, but WILL NOT work!!! In order for everything to work, you need to correct the code generated by 1C in accordance with the one below:

LoadModule _1cws_module "C:\Program Files\1cv82\8.2.13.205\bin\wsap22.dll" #1c publication AllowOverride None Order allow,deny Allow from all SetHandler 1c-application

After making all the changes, reboot apache and enjoy life!!!

Note:

All work was carried out with using Windows Server 2008 R2 x64, Apache 2.2.17, 1C:Enterprise 8.2 (8.2.13.205).

Directive meaning _1cws_module depends on your OS version and 1C:Enterprise installation folder

You can check the work at http://site/sb

Upon further study of the problem, the code below was found to work; it is recommended to use it only if the main code generates an error:

#1c publication Alias ​​"/sb" "C:\Apache2.2\htdocs\sb" AllowOverride None Options+ExecCGI Order allow,deny Allow from all SetHandler 1c-application ManagedApplicationDescriptor "C:\Apache2.2\htdocs\sb\default.vrd"

Using the directive +ExecCGI hints to us that we are, after all, working with 1C in CGI mode. If CGI is not configured on your server, then you better configure it!!!

Although 1C does not recommend using a web server in file mode (but only in server mode) - nevertheless, for small enterprises with 2-3 accountants, using a web server on new configurations with “managed forms” (Accounting 3.0, Salary 3.0, etc.) - allows you to organize quite fast access to a database of network computers, even if they are computers that are essentially old junk. It is only important that the main computer with the databases and web server is decent (for example, Core I3, 8 GB of RAM and an SSD drive).

Step-by-step guide to setting up a 1C web server on Apache (including the file version of the database)

1. Download the Apache installer

For some reason, Apache stopped releasing all new versions (for example 2.4.25) as a self-extracting distribution. It is quite acceptable for us to use a non-latest distribution, 2.2.25, which allows us to get a convenient installer and avoid additional manipulations.

Please note that it is convenient for us to use the *.msi installer

Based on the user's recommendation (thanks, Vladimir), I am posting a link to Apache version 2.4 (www.apachelounge.com). Also from his words - if you download x64, then be prepared to install a similar x64 1c platform and edit the line LoadModule _1cws_module "C:/Program Files/1cv8/8.3.9.2016/bin/wsap24.dll" in httpd.conf.
But I myself do not recommend using 64-bit 1C, because, with a high degree of probability, enormous difficulties will arise when connecting commercial equipment, or some other third-party libraries.

Select “no ssl” distribution if the databases will be open only within ours local network or “ssl” distribution kit if the database will be opened on the Internet. You can read more about setting up ssl in the infostart article

In our example, we will configure a server without ssl for use only within the local network.

2. Run the downloaded installer

Fill in Network Domain: Localhost, Server name: Localhost

Press NEXT, Setup type: Typical NEXT, NEXT, INSTALL

3. Check if the web server has started

To do this, open any browser and specify the page address http://localhost

We should see a page that says It Works!

Let's find out the IP address of our computer on the local network. To do this, in the lower right corner (next to the clock) we find the local network icon, right-click on it and open “Network and Sharing Center”

Choose our network

And click the "Details" button

In my case, the computer address on the local network is 192.168.0.189

Now we return to the browser and check the availability of the It Works page at the IP address http://192.168.0.189 (in your case the numbers will be different)

If you see the familiar It Works page again, everything is fine,

4. Check the accessibility of the page from other computers and configure the firewall

Again we try to open the familiar page http://192.168.0.189 (your numbers are different) but from any other computer on the local network.

If, instead of a familiar page, you see “Cannot access the site” or a similar message, let’s configure the firewall. To do this, return to the computer where Apache is installed, go to "Control Panel" - "System and Security" - " Windows Firewall" and on the left side of the screen click on "Advanced options

Click on the “Rules for incoming connections” section, then on the right side of the window “Create a rule”

Check all three boxes

Specify an arbitrary name, for example “Web server port 80 for 1C”. Ready.

Again we go to other computers and make sure that now the browser shows the page we are familiar with at the IP address http://192.168.0.189 It Works

5. We publish our database on the web server.

Open our database configurator (Run 1C as administrator)

With the release of the 1C 8.2 platform, it became possible to use a web server when working with 1C to interact your database with the World Wide Web. Subsequently, as 8.3 and its new releases were released, the integration possibilities became increasingly expanded. Already now for communication with the Internet, others information systems and providing access to the database through a browser, you can use a web client, the ODATA interface, develop web services, http services.

In this article, we'll look at how to install an Apache web server and publish your infobase on it in just one minute! To do this, we have developed a simple two-button processing for you.

First, let's delve a little deeper into the theory. If you already know all this, feel free to scroll to the end of the article and download the treatment. For those who want to install a web server themselves, but are not 1C specialists, we recommend reading this introduction.

Why does the average user need to publish 1C on a web server?

Within of this material We will not consider all the advantages and conveniences of publishing a database on a web server. Let's dwell on what our clients often ask us to do - access to 1C via browser. You will be able to work with 1C from anywhere in the world without installing a platform. Another advantage of working in a browser is that you can access your program through mobile device: tablet, smartphone, controlled by any operating system: iOS, android, etc. It is enough to configure this option remote access, open the browser and point the connection to the drain. The most important thing is, if you publish a 1C database on a server for remote access, think about security! In addition to setting a password and other security measures, it is recommended to use a VPN to access the network on which the base is located. But this is the topic of a separate article and it is better for a less experienced specialist to turn to.

To provide remote access directly to the computer on which 1C is installed, and perhaps without 1C, read another.

How it works

To organize access to 1C via a browser, you must:

  • Any configuration developed on controlled forms
  • Install and configure a web server
  • Publish the database on a web server

1C supports two web servers:

  • Apache

The Apache web server is free, easy to install and configure, and will satisfy minimum requirements, so we will use it in our processing.

Let's get to the most interesting part. How to do all this? You can, of course, do it manually. But in order to save time and have little experience, you can use our free processing. According to our instructions, any user can handle its launch. Once again, we emphasize that the configuration should be in managed forms. Taxi mode or not doesn't matter.

Short instructions for those familiar with external processing:

  1. We make a copy (backup) of the information security system. The treatment is absolutely safe. But it never hurts. Let's read how to do it.
  2. Download the processing - file
  3. under administrator (computer administrator). Do not confuse this with running the 1C configuration under a user with full (administrative) rights
  4. In the command menu File - Open. Select the file SetupWebServer.epf/SetupWebServer.epf (version may differ)
  5. On the form, fill in the desired name for publication on the web server. At startup it is automatically filled in from the system header.
  6. When accessing the Internet through a proxy server, specify the proxy parameters
  7. Confirm that the Apache web server is loading from the Internet
  8. We're waiting for a while
  9. The web server has been downloaded and installed, the database has been published and configured - you can open it using the button. You can also add the address to favorites in the browser

If you have any questions or not everything is clear from the short instructions, read the detailed instructions with pictures.

  • Download the processing - file

Download the file to your computer, from where you can then open it from 1C

  • Log in to 1C by launching the platform under administrator (computer administrator)

Open the platform (list of information security) with local computer/server administrator rights. Right-click on the launch shortcut and select "run as administrator". This is necessary because the apache service starts.

  • In the command menu File - Open. Select Install WebServer.epf (version may differ)

In any configuration on managed forms, open processing by clicking “File-Open” in the upper left corner. Select our file downloaded in step 1.

  • On the form, fill in the desired name of the base for publication. At startup, it is automatically filled in from the system header.

Processing opens. By default, the name of the published database is filled in. You can change the name to your own; the program will try to correct you if you write invalid characters.

If during execution a message appears stating that extension modules are not installed, read how to install it.

  • When accessing the Internet through a proxy server, specify the proxy parameters

  • Click on the "Run" button

After clicking the button, a window appears, as in the image below. Click "Agree".

  • The database is published on the web server and configured - you can open it by clicking the button. Add an address to your browser favorites

  • Working with 1C in the browser is convenient and does not require platform installation

Once the processing is complete, you will have the Apache web server running. You can see that it is running, stop and restart in the system tray (lower right corner).

By right-clicking on the icon you can launch the web server monitor (apache service monitor).

You can check that the web server is working normally by entering the localhost line into any browser on the computer on which Apache is installed. If everything is in order you should see the inscription - It works!

Let’s say a few words that the processing does not use common modules from 1C configurations so that you can launch and install a web server on a configuration written without using the BSP (Standard Subsystem Library).

Also, you can ensure the security of your data by publishing an almost empty configuration. No reference books or documents are read or changed, your database data is not sent anywhere. Analyze the logbook to see for yourself.

Below is an image of the launch and execution of processing on an empty database, to which only one reference book “Nomenclature” has been added.

If you want 1C to always be at hand, use 1C rental without unnecessary manipulation.

If your goal is to access 1C from another network, from home, a business trip, even from a resort, then in addition to installing a web server, you need an external (“white”/dedicated) IP address and correct port configuration. In this case, great attention should be paid to the security of the base, so it is better to entrust this work to us. We will make any settings according to