fix thin client auto updade

This commit is contained in:
Dmitry Belyaev 2022-11-03 18:40:57 +03:00
parent 56ca8cc70f
commit 9d03cc2469

View File

@ -237,6 +237,8 @@ autoinstall:
sed -i 's%VirtualHost\s\*\:80%VirtualHost\ \*\:33380%' /etc/apache2/sites-available/001-1c.conf
sed -i 's%DocumentRoot\s\/var\/www\/html%DocumentRoot \/var\/www-1c\/html%' /etc/apache2/sites-available/001-1c.conf
sed -i 's%\#Include.*$%Include /etc/apache2/conf-available/1c.conf%' /etc/apache2/sites-available/001-1c.conf
# load 1c handler module
echo LoadModule _1cws_module "/opt/1cv8/x86_64/current/wsap24.so" >> /etc/apache2/conf-available/1c.conf
# allow www root
echo \<Directory\ \"/var/www-1c/html\"\> >> /etc/apache2/conf-available/1c.conf
echo \ \ \ \ Options Indexes Includes >> /etc/apache2/conf-available/1c.conf
@ -250,6 +252,8 @@ autoinstall:
# set apache hostname
sed -i "s%server_name\slocalhost;%server_name $(hostname);%" /etc/nginx/sites-available/apache-proxy
sed -i "s%\#ServerName.*$%ServerName $(hostname)%" /etc/apache2/sites-available/001-1c.conf
# fix 1c thin client auto update (with url_path=/1c/test1)
sed -E '/^\s*location\s+\/\s+/i\ \ \ \ rewrite ^/1c/e1cibdst/(.*) /1c/test1/e1cibdst/$1 last;\n' -i /etc/nginx/sites-available/apache-proxy
# enable new configs
ln -s /etc/apache2/sites-available/001-1c.conf /etc/apache2/sites-enabled/001-1c.conf
ln -s /etc/nginx/sites-available/apache-proxy /etc/nginx/sites-enabled/apache-proxy