diff --git a/config/nocloud/user-data b/config/nocloud/user-data index 3789607..376cd66 100644 --- a/config/nocloud/user-data +++ b/config/nocloud/user-data @@ -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 \ >> /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