# sqlite3 /usr/local/mgr5/etc/ispmgr.db
sqlite> delete from backup_queue;
# sqlite3 /usr/local/mgr5/etc/ispmgr.db
sqlite> delete from backup_queue;
./configure --add-module=../nginx-push-stream-moduleделаем общую include в /etc/nginx/conf.d/push-stream-module.conf
# Common settings for nginx-push-stream-module
push_stream_shared_memory_size 256M;
push_stream_max_messages_stored_per_channel 1000;
push_stream_max_channel_id_length 32;
push_stream_max_number_of_channels 200000;
push_stream_message_ttl 86400;
# поддержка мобильных платформ, для http запросов
server {
# nginx-push-stream-module server for push & pull
listen 8893;
server_name _;
# Include error handlers
#include bx/conf/errors.conf;
# Include im subscrider handlers
#include bx/conf/im_subscrider.conf;
location ^~ / { deny all; }
}
# поддержка мобильных платформ, для https запросов
# SSL enabled server for reading personal channels
server {
listen 8894 ssl;
server_name _;
ssl_certificate "/var/www/httpd-cert/www-root/example.com.crtca";
ssl_certificate_key "/var/www/httpd-cert/www-root/example.com.key";
#include bx/conf/ssl.conf;
# Include error handlers
#include bx/conf/errors.conf;
# Include im subscrider handlers
#include bx/conf/im_subscrider.conf;
location ^~ / { deny all; }
}
# для публикации сообщений
# Server to push messages to user channels
server {
listen 127.0.0.1:8895;
server_name _;
location ^~ /bitrix/pub/ {
push_stream_publisher admin;
push_stream_channels_path $arg_CHANNEL_ID;
push_stream_store_messages on;
allow 127.0.0.0/8;
deny all;
}
location ^~ / { deny all; }
# Include error handlers
#include bx/conf/errors.conf;
}
делаем инклюдку для server {}include /etc/nginx/push-stream-module-vhost.inc
# Location for long-polling connections
location ^~ /bitrix/sub {
# we don't use callback and droppped it (XSS)
if ( $arg_callback ) {
return 400;
}
push_stream_subscriber long-polling;
push_stream_allowed_origins "*";
push_stream_channels_path $arg_CHANNEL_ID;
push_stream_last_received_message_tag $arg_tag;
if ($arg_time) {
push_stream_last_received_message_time "$arg_time";
}
push_stream_longpolling_connection_ttl 40;
push_stream_authorized_channels_only on;
push_stream_message_template '#!NGINXNMS!#{"id":~id~,"channel":"~channel~","tag":"~tag~","time":"~time~","eventid":"~event-id~","text":~text~}#!NGINXNME!#';
}
# Location for websocet connections
location ^~ /bitrix/subws/ {
push_stream_subscriber websocket;
push_stream_channels_path $arg_CHANNEL_ID;
push_stream_websocket_allow_publish off;
push_stream_ping_message_interval 40s;
push_stream_authorized_channels_only on;
push_stream_last_received_message_tag "$arg_tag";
push_stream_last_received_message_time "$arg_time";
push_stream_message_template '#!NGINXNMS!#{"id":~id~,"channel":"~channel~","tag":"~tag~","time":"~time~","eventid":"~event-id~","text":~text~}#!NGINXNME!#';
}
Включаем в битриксеОригинал https://dermanov.ru/exp/configure-push-and-pull-module-for-bitrix24/
mv /etc/httpd/conf/vhosts /root
mkdir /etc/httpd/conf/vhosts/usr/local/mgr5/sbin/mgrctl -m ispmgr webreconfigure.initialize shutdown=on
/usr/local/mgr5/sbin/mgrctl -m ispmgr webreconfigure.restoreAH00015: Unable to open logs
AH00015: Unable to open logs# pwd
/etc/systemd/system/httpd.service.d
# cat limits.conf
[Service]
LimitNOFILE = infinity
LimitMEMLOCK = infinity
systemctl daemon-reload
apachectl start
cp etc/ispmgr.db /root/isp.db (на всякий случай)
ATTACH DATABASE '/root/backup/etc/ispmgr.db' as back;
delete from db_assign;
INSERT INTO db_assign (id, name, unaccounted, users, db_server) SELECT back.db_assign.id, back.db_assign.name, back.db_assign.unaccounted, back.db_assign.users, back.db_assign.db_server from back.db_assign;