Browse Source

provision.pl - added haproxy install

tags/release-00
gashapwn 3 years ago
parent
commit
0fdd8860d0
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      perl-script/provision.pl

+ 11
- 1
perl-script/provision.pl View File

@@ -65,7 +65,7 @@ system("pkg_add p5-JSON");

# Install apache
system("pkg_add apache-httpd");
printf("configuring apache\n");
# enable the userdir module
system("sed -i -e 's/^\\(.\\)*#\\(LoadModule userdir_module\\)/\\1\\2/' /etc/apache2/httpd2.conf");
system("sed -i -e 's/^\\(.\\)*#\\(Include \\/etc\\/apache2\\/extra\\/httpd-userdir.conf\\)/\\1\\2/' /etc/apache2/httpd2.conf");
@@ -84,3 +84,13 @@ system("sed -i -e 's/\\(<\\/Directory>\\)/ Options -Indexes\\

# Change the port to 5001
system("sed -i -e 's/^\\(.\\)*Listen *80/\\1Listen 5001/' /etc/apache2/httpd2.conf");
# rev up those apache processes!
system("rcctl start apache2");


# Install and config haproxy
system("pkg_add haproxy");

printf("configuring haproxy\n");
system("cp ./conf/haproxy.cfg /etc/haproxy/haproxy.cfg");
system("rcctl start haproxy");

Loading…
Cancel
Save