diff --git a/README.md b/README.md index 8a9654e..8bd81f1 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,24 @@ $ cd haproxy-wi/cgi-bin $ chmod +x *.py ``` -For Apache do virtualhost with cgi-bin. +For Apache do virtualhost with cgi-bin. Like this: +``` + + ServerName haproxy-wi + ErrorLog /var/log/httpd/haproxy-wi.error.log + CustomLog /var/log/httpd/haproxy-wi.access.log combined + + DocumentRoot /var/www/haproxy-wi + ScriptAlias /cgi-bin/ "/var/www/haproxy-wi/cgi-bin/" + + + Options +ExecCGI + AddHandler cgi-script .py + Order deny,allow + Allow from all + + +``` ![alt text](image/haproxy-wi-overview.jpeg "Overview page") diff --git a/cgi-bin/users.py b/cgi-bin/users.py index 0635927..3877441 100644 --- a/cgi-bin/users.py +++ b/cgi-bin/users.py @@ -51,7 +51,6 @@ for users in USERS: need_id_group = "usergroup-%s" % users[0] sql.get_groups_select(need_id_group, selected=users[5]) print('') - #print('' % users[0]) print('' % users[0]) print('') print('' @@ -86,12 +85,18 @@ print('
' '' '' '') +i = 0 for group in GROUPS: + i = i + 1 print('' % group[0]) - print('' % (group[0], group[1])) - print('' % (group[0], group[2])) - #print('' % group[0]) - print('' % group[0]) + if i == 1: + print('%s' % (group[1])) + print('%s' % (group[2])) + print('') + else: + print('' % (group[0], group[1])) + print('' % (group[0], group[2])) + print('' % group[0]) print('') print('' '
+ Add') diff --git a/cgi-bin/viewlogs.py b/cgi-bin/viewlogs.py index 924bf8d..4df9038 100644 --- a/cgi-bin/viewlogs.py +++ b/cgi-bin/viewlogs.py @@ -29,7 +29,7 @@ print('' '