There is a windows-server c 1C 8.3 (DB - MSSQL).
The task is to set up database publishing on a Linux web server.
Subtleties - the 1C module for Apache works only with 2.0 and 2.2, and the current version in most distributions is 2.4+
Writes more for yourself, not to forget. Well, you never know, suddenly someone else will come in handy - you do not have to run around the forums in search of the right teams.
Iron - gave gigabytes of RAM, one core and 20 gigabytes of disk. Zoom is never too late.
OS: Debian Stable, I'm used to it.
I put a minimum, including an ssh-server, but not including web. To this we will return.

After installing the basic setting to taste, I usually set the utf8 locale, put sudo, mc and vim, the rest according to needs.
Next you need to put apache 2.2. And do it in the right way, and not just by downloading the deb package. :)
')
First we add lines to /etc/apt/sources.list with a link to the previous version of the distribution.
deb http://mirror.yandex.ru/debian/ wheezy main
deb-src http://mirror.yandex.ru/debian/ wheezy main
You can, of course, write
oldstable - at the moment it will also be correct. But only in the present, because sooner or later a new stable version will be released in
oldstable and then instead of apache 2.2 there will be 2.4. Although, I hope, by that time, 1C will be updated and will work with newer versions of Apache. But who knows? :)
Where
mirror.yandex.ru - there is written the name of your favorite server with a repository.
Then we update the indexes -
apt-get update - and see what we have here for apache with the command
apt-cache showpkg apache2There a lot of things are displayed, but we are only interested in the beginning of the output:
Package: apache2
Versions:
2.4.10-10 + deb8u3 (/var/lib/apt/lists/mirror.yandex.ru_debian_dists_stable_main_binary-i386_Packages)
Description Language:
File: /var/lib/apt/lists/mirror.yandex.ru_debian_dists_stable_main_binary-i386_Packages
MD5: d02426bc360345e5acd45367716dc35c
Description Language: en
File: /var/lib/apt/lists/mirror.yandex.ru_debian_dists_stable_main_i18n_Translation-en
MD5: d02426bc360345e5acd45367716dc35c
Description Language: ru
File: /var/lib/apt/lists/mirror.yandex.ru_debian_dists_stable_main_i18n_Translation
MD5: d02426bc360345e5acd45367716dc35c
2.4.10-10 + deb8u1 (/var/lib/apt/lists/security.debian.org_dists_stable_updates_main_binary-i386_Packages)
Description Language:
File: /var/lib/apt/lists/mirror.yandex.ru_debian_dists_stable_main_binary-i386_Packages
MD5: d02426bc360345e5acd45367716dc35c
Description Language: en
File: /var/lib/apt/lists/mirror.yandex.ru_debian_dists_stable_main_i18n_Translation-en
MD5: d02426bc360345e5acd45367716dc35c
Description Language: ru
File: /var/lib/apt/lists/mirror.yandex.ru_debian_dists_stable_main_i18n_Translation
MD5: d02426bc360345e5acd45367716dc35c
2.2.22-13 + deb7u6 (/var/lib/apt/lists/mirror.yandex.ru_debian_dists_wheezy_main_binary-i386_Packages)
Description Language:
File: /var/lib/apt/lists/mirror.yandex.ru_debian_dists_wheezy_main_binary-i386_Packages
MD5: d24f049cd70ccfc178dd8974e4b1ed01
Description Language: en
File: /var/lib/apt/lists/mirror.yandex.ru_debian_dists_wheezy_main_i18n_Translation-en
MD5: d24f049cd70ccfc178dd8974e4b1ed01
Description Language: ru
File: /var/lib/apt/lists/mirror.yandex.ru_debian_dists_wheezy_main_i18n_Translation-
MD5: d24f049cd70ccfc178dd8974e4b1ed01
We see that in addition to 2.4.10 there is version 2.2.22-13 + deb7u6 - what you need.
Set:
apt-get install apache2 = 2.2.22-13 + deb7u6Or, more precisely:
install apache2 = 2.2.22-13 + deb7u6 apache2-mpm-worker = 2.2.22-13 + deb7u6 apache2.2-common = 2.2.22-13 + deb7u6 apache2.2-bin = 2.2 .22-13 + deb7u6 , and the rest of the dependencies are already pulled up automatically.
After that, we put the Apaches on hold, so as not to update by chance.
apt-mark hold apache2 apache2-mpm-worker apache2.2-common apache2.2-bin
apache2 is marked as committed.
apache2-mpm-worker is marked as committed.
apache2.2-common is marked as committed.
apache2.2-bin is marked as committed.
You can start the service apache2 start and hit telnet on port 80 to check if the browser is too lazy to start.
telnet localhost 80 Trying :: 1 ... Connected to localhost.
Escape character is '^]'.
one
<! DOCTYPE HTML PUBLIC "- // IETF // DTD HTML 2.0 // EN">
<html> <head>
<title> 501 Method Not Implemented </ title>
</ head> <body>
<h1> Method Not Implemented </ h1>
<p> 1 to /index.html not supported. <br />
</ p> <hr>
<address> Apache / 2.2.22 (Debian) Server at 1cweb Port 80 </ address>
</ body> </ html>
Connection closed by foreign host.
Swears - it means it works.
Now we put 1C.
Only 1C web services are needed (package
1c-enterprise83-ws ). And
1c-enterprise83-common , which is registered in dependencies. And
1c-enterprise83-server , which is not registered in dependencies, but without it, the publication utility writes “Segmentation Error”.
In principle, only a module for the Apache
wsap22.so from the
1c-enterprise83-ws package is needed, and everything else can be done through a text editor. But I’m a lazy person and better spend a few megabytes per 1C than I’ll use my hands to drive lines into configs. :)
Next you need to create a folder to store the settings of published 1C databases. It is possible in the web server tree, but I'd rather do it separately, right at the root, / 1c.
After that, from the folder with installed 1C files (
/opt/1C/v8.3/i386 ), launch the
webinst publishing
utility with the following parameters (publish our test database):
./webinst -apache22 -wsdir testlitupp -dir / 1c / testlitupp -connstr "Srvr = 10.0.0.4; Ref = testlitupp;" -confPath /etc/apache2/apache2.conf
Publish done
-apache22 - our version of webserver
-wsdir testlitupp - the folder on the web server where the published database will be available (http: // your server / testlitupp)
-dir / 1c / testlitupp - folder in which the default.vrd file with the publication settings will be stored
-connstr "Srvr = 10.0.0.4; Ref = testlitupp;" - ip of the 1C server and the name of the published database
-confPath /etc/apache2/apache2.conf - path to apache config
If it says “Publish completed,” then everything went well. If you write "Segmentation Error", then you most likely forgot to install the
1c-enterprise83-server .
According to the results we have the file default.vrd
<? xml version = "1.0" encoding = "UTF-8"?>
<point xmlns = "http://v8.1c.ru/8.2/virtual-resource-system"
xmlns: xs = "http://www.w3.org/2001/XMLSchema"
xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
base = "/ testlitupp" ib = "Srvr = 10.0.0.4; Ref = testlitupp;" />
And a few new lines in the web server configuration file:
LoadModule _1cws_module "/opt/1C/v8.3/i386/wsap22.so"
# 1c publication
Alias ​​"/ testlitupp" "/ 1c / testlitupp /"
<Directory "/ 1c / testlitupp /">
AllowOverride All
Options none
Order allow, deny
Allow from all
SetHandler 1c-application
ManagedApplicationDescriptor "/1c/testlitupp/default.vrd"
</ Directory>
Restart the apache (service apache2 restart) and go to see what was published there.
Published, asks for a password.

And lets in the base.

Works. Additional publishing settings are made by editing vrd-files (for example, turning on debugging), and your 1C programmers should do the finishing of the web client interface.
If you will add options, for example, with connecting services manually, do not forget to delete the last slash in the default.vrd file in the line "base =" / testlitupp "ib =" Srvr = 10.0.0.4; Ref = testlitupp; "
/ >, I was busy with this for a long time. If you do not delete and add something after, then "Error 500" crashes without additional information.
What will be the load on the web server - I still do not know, we still have it working in test mode and there are enough allocated resources. But to add memory or cores as the needs increase does not amount to problems.
In general, in other linux distributions everything is done in the same way, the differences are only in the ways of installing the old version of apache.