Installing Apache

The Apache web server is free software(however, it has its own license, which must be observed) and can be freely downloaded from the official website https://httpd.apache.org . You can download any version, not lower than 2.2.16. Before downloading, select the operating system of your server (Unix or Windows). Directory with different versions of Apache:
https://archive.apache.org/dist/httpd/binaries/win32/

Developers of 1C configurations to develop and test their configurations in web mode can also install Apache on their local computer, you can run Apache on Windows 7 and Windows XP, when installing on the developer's local computer, you can choose to install for one user (current user), in which case the web server will be accessed not through the standard port 80, but through port 8080.

The Apache installation procedure is quite simple. After downloading a small distribution (5.2 MB) in MSI format (usually the file is named like "httpd-2.2.16-win32-x86-no_ssl.msi") of the web server, extract the distribution and run the "setup.exe" file.

Modern conditions, with the widespread use of mobile devices and available internet makes new demands on the information systems of even small firms. If a few years ago remote access was the lot of large organizations, today the ability to access information from anywhere is taken for granted. Today we will tell you how to quickly and cost-effectively organize web access to 1C:Enterprise databases operating in file mode.

The traditional scheme of working with 1C:Enterprise in file mode implies file sharing information base via the SMB protocol (Microsoft network). In this case, one of the computers acts as file server, while others work with hosted in public access information base.

However, this scheme has a number of significant drawbacks. The speed of work is significantly affected by how throughput networks, and computing power client computers. We discussed this issue in more detail in our material. This is especially evident after moving to managed application-based configurations, which are much more resource-intensive than previous-generation configurations.

The issue of remote access is also acute, if for remote computers you can still organize remote access via RDP, which, by the way, is not always available for small companies that do not have a dedicated server, then with mobile devices it's all pretty sad.

At the same time, a managed application provides new features, such as web access to an infobase, including those working in file mode. This allows you to qualitatively change the work with information system with virtually no additional cost.

On the computer with the infobase, the additional role of the web server is raised, on which the infobase is published. After that, you can continue to work with it both in file mode and in web server mode.

In this case, it is not necessary to use a browser for operation; the platform can also access the database through a web server in the mode thin client. This feature allows you to organize access not only for remote and mobile clients, but also improve work on underperforming machines in the office, since all the main calculations will be performed on the server side and the traffic transmitted over the network will be minimized, as well as the load on the client computer .

And, of course, there are almost unlimited possibilities. remote access to the database: from anywhere, from any device, there would be a browser.

Below we will consider possible configurations for organizing web access to small databases operating in file mode based on client operating systems.

On the this moment the two main web servers Apache and IIS are supported, the platform must also be installed on the machine with the web server and web server extension modules. You can always install them additionally by simply running the platform installer again:

Windows and IIS

Internet Information Services (IIS), for unknown reasons, is not popular with administrators and 1C nicknames. But in vain, ignoring a regular solution in favor of some third-party software, even if it’s not bad, looks at least strange.

To install IIS on a client OS, in our case Windows 7 x64, go to Control Panel - Programs and Features - Turn Windows features on or off.

In the window that opens, select IIS Services, then expand the list and go to Internet Services - Application Development Components and check the box next to ISAPI Extensions, the rest of the parameters can be left as default.

After installing IIS, let's move on to configuring it, for this open Control Panel - Administrative Tools - Internet Information Services (IIS) Manager.

Select from the tree on the left Application pools, click right click mouse on DefaultAppPool- Extra options and allow 32-bit applications by setting the appropriate option in True.

Now set the necessary rights for groups IUSR and IIS_IUSRS. We issue rights to the folder with the infobase Change and Read and execute:

per folder bin platforms - Reading and Execution:

Then we run 1C:Enterprise as an administrator and load the required infobase into the configurator mode.

On the menu Administration choose Publishing to a web server. 1C:Enterprise will automatically detect the web server (IIS) and offer to place the web application in the root of the web server in the directory with the name of the infobase folder, which will also be the name of the publication, you can change these settings if necessary.

Ready! To access the database, we can use the address of the form http://hostname(address)/publication_name, in our case http://192.168.3.109/Acc30, launch the browser and check the work.

You can also configure the database to work with it through the platform, for this, in the dialog for adding a new infobase, specify the location on the web server:

The next step is to enter the connection address:

After launching the infobase, you can make sure that it works in the web server mode, and not in the file mode:

Windows and Apache 2.2

If for some reason you do not want to use IIS, you can configure 1C to work with another popular Apache web server. Unfortunately, the Apache developers have stopped publishing binary builds for Windows, offering to contact their partners, so let's go to the Apache Haus website and download the build 2.2.x architecture x86 even if you have a 64-bit operating system.

Attention! To obtain an Apache build, you should only use reliable sources, which are listed on the project website. The security of your web server and your data depends on it!

You will also need to install the Microsoft Visual C++ 2008 Redistributable Package, which is required for the Apache build to work properly.

Then unpack the downloaded Apache archive into an arbitrary directory, for example, c:\apache22, from the whole set of folders we are interested in folders bin and htdocs, the first one contains the web server executable files, the second one should contain the web content.

Let's open command line with administrator rights and go to the directory bin web server:

Cd C:\Apache22\bin

Now let's install Apache as a service:

Httpd -k install

We do not pay attention to warnings, for the purposes of use with 1C it is suitable Apache configuration default.

Since the service runs on behalf of the system account it is not necessary to set the rights to the folders with the base and the platform.

Then, in the same way, we launch 1C as an administrator in the configurator mode and proceed to publishing on a web server. Unlike IIS, in this case, the platform itself cannot specify the path and create a folder, so we do it manually. The folder must be created inside a directory htdocs and its name must match the name of the publication:

In our case, this C:\Apache22\htdocs\Acc30\ By the way, you can create the desired directory directly in the folder selection dialog. Then we publish the information base.

" can work in three modes:

  • Thick client mode
  • Thin client mode
  • Web client mode

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

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

We immediately note that the material of this article
can be used not only for deployment on a corporate
web server of our workflow system, but also for deployment
other "1C" configurations, for example, "1C: Small business management",
"1C: Trade Management", "1C: Document Management", "1C: Management
production enterprise" and others who can work in the mode
managed forms 8.2.

Installing Apache

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


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


The Apache installation procedure is quite simple.After
downloading a small distribution kit (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
unzip the distribution and run the "setup.exe" file.



click on the picture to enlarge


Once the installation has started, complete
your web server settings. Enter your email address
system administrator, in the fields Network Domain, Server Name 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, press "Next"
and wait for the installation to finish. Status of the Apache web server 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 mouse button on the icon indicated in the upper figure.



Usually none advanced settings
Apache in Windows system we do not have to do, the SED configuration
"Workflow Prof" will be published on the web server automatically,
from the "1C:Enterprise 8.2" configurator.

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 the web server. To publish a configuration
to the web server, you need to open the database in the "Configurator" mode and in
Select "Publish to Web Server" from the "Administration" menu.



In the window that opens, enter:

  • Name - the name of your database in Latin characters. given name will be
    used by users in web browsers by users when they type
    URLs, for example by entering the name cfg82_doc, for the localhost web server,
    users will need the database address as http://localhost/cfg82_doc . The name must conform to 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 a web browser and enter the address of your
published database. Everything must work. If there are
problems, 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 lines
indicating the use of Apache with 1C: Enterprise 8.2, an example is
lines:



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


If the string does not exist, try creating it manually (after doing
a copy of the httpd.conf file), specifying the path to the wsap22.dll library in the line
your platform 1C. It is recommended to use the platform 1C version below
8.2.12. In some cases, it helps to deploy a web server outside of
default directory "Program files", to some other directory of your
server or workstation. Also, in the Apache config 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.
Choose your name and enter your password. In the picture below, like at all
the rest shows examples of running the "Document Management Prof" platform 8.2 in
firefox web browser.





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



Working in the web client is almost the same as working with managed forms in thin and web client.


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

Starting from the version of the 1C 8.3 platform, it became possible to publish infobases on web servers. This solution very convenient, because by clicking on the link in the browser, you can fully work in 1C. Please note that work is possible only in the "Enterprise" mode. You can use the configurator only on a thick client.

Of course, 1C announced its list of requirements for operating system and browsers from which the connection will be made through the web server to 1C. But, in practice, there are many more possibilities. For example, you can work in 1C through a regular browser from a mobile phone.

In this article, we will take a step-by-step look at publishing a 1C 8.3 infobase on a web server using Apache. The settings described below, which we will make in 1C itself, are no different from publishing on the IIS web server.

The only difference is that the server running IIS is more “finicky” in terms of settings, so most often the choice falls on Apache.

Installing and configuring Apache 2.4

First of all, you need to download Apache itself, for example, from the official website. Current on this moment version 2.4. There is nothing complicated in the installation process, just follow the assistant.

When you see a window with information about the server during installation, enter "localhost" in the first two fields. This will mean that our computer will be the server on which 1C is located.

Also note that we will use port 80 (the switch at the bottom of the form). It is important that it is not occupied by other applications.

After successful installation of the program, a special Apache icon will appear in the tray. With it, you can both start and stop the web server.

Publication of the information base 1C 8.3

After installing Apache, you can proceed directly to publishing the infobase on the web server. To do this, go to the desired database in the configurator mode. All necessary actions will be performed here. In this case, as mentioned above, you can use this instruction in the case of using IIS.

Select "Publish to Web Server" from the "Administration" menu. In the window that opens, we will leave all the default settings, changing only a small part of them.

As a web server, we will select Apache 2.2, which we installed earlier. The name can be an arbitrary value. We publish 1C: Document Management, so we'll just call it "doc". In the directory field, we will also select the empty folder we created, which can be located anywhere.

After entering all the necessary data, click on the "Publish" button and restart the Apache web server.

Now in address bar browser, enter "localhost/doc". We have an authorization window in 1C.

After entering a login with a password and authentication, the familiar 1C will open before us.

To begin with, I will say that I am not a guru in Apache, or in 1C, or in IIS. Nevertheless, I had to plunge, because I faced a simple task - the local network plus several databases 1C: 8.3 plus several users. And, of course, protection against possible failures ... and a minimal budget.

I will not write about an attempt, generally successful, to use 1C in conjunction with the postgres sql server. I take off my hat to this DBMS, but I refused this path.

The choice fell on the use file versions databases and publishing them on a web server. 1C works with Apache and IIS. You can not talk about the merits of Apache - everyone is on hearing. With regard to 1C, you can only add that the publication of databases takes place on Apache without additional settings. I only had to tinker with the distribution kit of this popular web server, which will correctly fit into installed programs Windows OS. Yes, I forgot to mention that everything is deployed on these operating systems. The problem is that 1C does not see Apache if the server is installed by simple copying. I dabbled in creating artisanal Apache installers in order to install version 2.4 - it did not help. Well, 1C does not see the web server and that's it. However, a suitable distribution for version 2.2 has been found.

Everything went like clockwork. Before the start of real work of several users with several databases. From time to time, everyone on the network had the inscription “Session is missing or deleted” with a suggestion to restart the database or exit. At the same time, the program, which is logical, stopped working for all users at once. Work in this mode continued. There was no data loss, but my and my staff's patience was not unlimited. Attempts to find a solution on the Internet did not lead to anything, except for the aggravation of the situation when changing the Apache operation parameters (ThreadsPerChild; MaxRequestsPerChild; TimeOut).

Then I decided to try to switch from Apache to IIS. At the same time, IIS was raised on the platform of the usual desktop Win7x64 from the standard delivery of the operating system. There is a lot of information on the IIS settings for the needs of the 1C web service on the network. For example here. Everything went well at first, but...

After a short time, it crashed again with the same error.

Then I tried to create several application pools and distribute web applications (bases) between them. As a result, w3wp.exe, the IIS worker process, was started as many times as the number of application pools used to load the databases. In this case, the username of each running process became the name of the IIS application pool. The load has been distributed.

What can I say? Days of work go by without a hitch. There has been a marked increase in consumption random access memory. But before that it might have been big too. It's just that both Apache's httpd and IIS's w3wp processes crashed to the right size. Upon reaching a certain critical mass.