HAProxy - Docker


#1

Hi,

I am trying to figure out a way to see the logs using HAProxy.

Every time I need to check the logs I need to get into specific folder using ssh and read those files.

Is it possible to somehow config HAProxy for example in some way which serve web content that is my desired folder of logs:

frontend https
acl logs-in-folder path_beg -i /logs/
use_backend view_log if logs-in-folder

backend view_log
# here I would like to serve the web content which point to the folders of logs

The application is using docker so the I have a tomcat in docker

the index.html

Index of /logs/

Index of /logs/


tomcat-logs-1/ tomcat-logs-2/

#2

No, use a webserver for this. Haproxy does not access the file system at runtime.


#3

thanks. so I think I should create a docker tomcat/nginx to serve that file?


#4

I don’t know, I don’t have any docker experience and I also didn’t really understand your question to begin with; just answering to the fact that haproxy does not serve files from disk.