Pavel Loginov 2022-03-17 07:23:17 +02:00
parent 1bec825b94
commit 5239d5dc74
3 changed files with 19 additions and 11 deletions

View File

@ -1,20 +1,19 @@
[main] [main]
#Path to files destination # Path to the files destination
fullpath = /var/www/haproxy-wi fullpath = /var/www/haproxy-wi
log_path = ${fullpath}/log/ log_path = ${fullpath}/log/
[configs] [configs]
#Dir where configs will be save # Folders for configs
haproxy_save_configs_dir = ${main:fullpath}/configs/hap_config/ haproxy_save_configs_dir = ${main:fullpath}/configs/hap_config/
kp_save_configs_dir = ${main:fullpath}/configs/kp_config/ kp_save_configs_dir = ${main:fullpath}/configs/kp_config/
nginx_save_configs_dir = ${main:fullpath}/configs/nginx_config/ nginx_save_configs_dir = ${main:fullpath}/configs/nginx_config/
[mysql] [mysql]
#Enable MySQL DB. Default will be used Sqlite DB. Default disable # By default Sqlite DB is used
enable = 0 enable = 0
mysql_user = haproxy-wi mysql_user = roxy-wi
mysql_password = haproxy-wi mysql_password = roxy-wi
mysql_db = haproxywi mysql_db = roxywi
mysql_host = 127.0.0.1 mysql_host = 127.0.0.1
mysql_port = 3306 mysql_port = 3306

View File

@ -12,6 +12,10 @@
TimeOut 600 TimeOut 600
LimitRequestLine 16380 LimitRequestLine 16380
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:8765/ [P,L]
ProxyPassReverse / http://localhost:8765/
WSGIDaemonProcess api display-name=%{GROUP} user=apache group=apache processes=1 threads=5 WSGIDaemonProcess api display-name=%{GROUP} user=apache group=apache processes=1 threads=5
WSGIScriptAlias /api /var/www/haproxy-wi/api/app.wsgi WSGIScriptAlias /api /var/www/haproxy-wi/api/app.wsgi
@ -51,7 +55,7 @@
Order Deny,Allow Order Deny,Allow
Deny from all Deny from all
</FilesMatch> </FilesMatch>
<FilesMatch "\.db$"> <FilesMatch "\.db$">
Order Deny,Allow Order Deny,Allow
Deny from all Deny from all
@ -69,4 +73,4 @@
Header set Cache-Control "max-age=86400, public" Header set Cache-Control "max-age=86400, public"
</filesMatch> </filesMatch>
</IfModule> </IfModule>
</VirtualHost> </VirtualHost>

View File

@ -12,6 +12,11 @@
TimeOut 600 TimeOut 600
LimitRequestLine 16380 LimitRequestLine 16380
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:8765/ [P,L]
ProxyPassReverse / http://localhost:8765/
WSGIDaemonProcess api display-name=%{GROUP} user=www-data group=www-data processes=1 threads=5 WSGIDaemonProcess api display-name=%{GROUP} user=www-data group=www-data processes=1 threads=5
WSGIScriptAlias /api /var/www/haproxy-wi/api/app.wsgi WSGIScriptAlias /api /var/www/haproxy-wi/api/app.wsgi
@ -51,7 +56,7 @@
Order Deny,Allow Order Deny,Allow
Deny from all Deny from all
</FilesMatch> </FilesMatch>
<FilesMatch "\.db$"> <FilesMatch "\.db$">
Order Deny,Allow Order Deny,Allow
Deny from all Deny from all