mirror of https://github.com/Aidaho12/haproxy-wi
v2.0.6
parent
46f8932c7c
commit
95105c68a6
|
@ -28,11 +28,10 @@ $ cd /var/www/haproxy-wi
|
||||||
$ ./install
|
$ ./install
|
||||||
```
|
```
|
||||||
## Manual install
|
## Manual install
|
||||||
For install just [dowload](https://github.com/Aidaho12/haproxy-wi/archive/master.zip) archive and untar somewhere:
|
For install just clone:
|
||||||
```
|
```
|
||||||
$ cd /var/www/
|
$ cd /var/www/
|
||||||
$ unzip master.zip
|
$ git clone https://github.com/Aidaho12/haproxy-wi.git /var/www/haproxy-wi
|
||||||
$ mv haproxy-wi-master/ haproxy-wi
|
|
||||||
$ chown -R apache:apache haproxy-wi/
|
$ chown -R apache:apache haproxy-wi/
|
||||||
$ pip install -r haproxy-wi/requirements.txt
|
$ pip install -r haproxy-wi/requirements.txt
|
||||||
$ chmod +x haproxy-wi/cgi-bin/*.py
|
$ chmod +x haproxy-wi/cgi-bin/*.py
|
||||||
|
@ -40,7 +39,7 @@ $ chmod +x haproxy-wi/cgi-bin/*.py
|
||||||
|
|
||||||
For Apache do virtualhost with cgi-bin. Like this:
|
For Apache do virtualhost with cgi-bin. Like this:
|
||||||
```
|
```
|
||||||
<VirtualHost *:8000>
|
<VirtualHost *:8080>
|
||||||
ServerName haproxy-wi
|
ServerName haproxy-wi
|
||||||
ErrorLog /var/log/httpd/haproxy-wi.error.log
|
ErrorLog /var/log/httpd/haproxy-wi.error.log
|
||||||
CustomLog /var/log/httpd/haproxy-wi.access.log combined
|
CustomLog /var/log/httpd/haproxy-wi.access.log combined
|
||||||
|
@ -65,6 +64,7 @@ Default Haproxy-WI use Sqlite, if you want use MySQL enable in config, and creat
|
||||||
MariaDB [(none)]> create user 'haproxy-wi'@'%';
|
MariaDB [(none)]> create user 'haproxy-wi'@'%';
|
||||||
MariaDB [(none)]> create database haproxywi;
|
MariaDB [(none)]> create database haproxywi;
|
||||||
MariaDB [(none)]> grant all on haproxywi.* to 'haproxy-wi'@'%' IDENTIFIED BY 'haproxy-wi';
|
MariaDB [(none)]> grant all on haproxywi.* to 'haproxy-wi'@'%' IDENTIFIED BY 'haproxy-wi';
|
||||||
|
MariaDB [(none)]> grant all on haproxywi.* to 'haproxy-wi'@'localhost' IDENTIFIED BY 'haproxy-wi';
|
||||||
```
|
```
|
||||||
![alt text](image/haproxy-wi-overview.jpeg "Overview page")
|
![alt text](image/haproxy-wi-overview.jpeg "Overview page")
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,8 @@ if form.getvalue('servaction') is not None:
|
||||||
server_state_file = config.get('haproxy', 'server_state_file')
|
server_state_file = config.get('haproxy', 'server_state_file')
|
||||||
haproxy_sock = config.get('haproxy', 'haproxy_sock')
|
haproxy_sock = config.get('haproxy', 'haproxy_sock')
|
||||||
enable = form.getvalue('servaction')
|
enable = form.getvalue('servaction')
|
||||||
|
backend = form.getvalue('servbackend')
|
||||||
|
|
||||||
cmd='echo "%s %s" |socat stdio %s | cut -d "," -f 1-2,5-10,34-36 | column -s, -t' % (enable, backend, haproxy_sock)
|
cmd='echo "%s %s" |socat stdio %s | cut -d "," -f 1-2,5-10,34-36 | column -s, -t' % (enable, backend, haproxy_sock)
|
||||||
|
|
||||||
if form.getvalue('save') == "on":
|
if form.getvalue('save') == "on":
|
||||||
|
|
Loading…
Reference in New Issue