Haproxy 1.8, how to get virtual path url?

Hello,

i have application using rubby, and wont to placed behind haproxy. and result static file like js css and image cannot load / broken. but when accessed via localhost, all static file is loaded.

from the browser it is known that the proxy cannot load the URL:

for example:
when access subdomain sub.domain.com

i knew in browser Request URL for static :

http://sub.domain.com/assets/application-4de6c48f86c316cadff623630f535be12cf5021edde00f5ea950474dbd52e3cf.css

http://sub.domain.com/assets/application-4dc51ee3cd720797a149ee09f6d6f6648689420db499100dec4f29a5e25b1a89.js

and the path to static in folder refer to:
/home/user/webapps/assets/css/file.css
/home/user/webapps/assets/css/file.js

the question is how to configure haproxy for case above?

Thank you

Analyze your webserver logs and figure out what changes between a request coming from haproxy and a request coming from the browser.

Haproxy is not a webserver, it does not serve files from disk, if that’s what you are trying to do.

thank you … i have analyze log from puma server

for example :
ActionController::RoutingError (No route matches [GET] “/assets/procedure-ba89f3c7e2f192ec4c435897d0eb6189cac0f38dedee8e079eb378403f8732ac.png”):

ActionController::RoutingError (No route matches [GET] “/assets/application-4de6c48f86c316cadff623630f535be12cf5021edde00f5ea950474dbd52e3cf.css”):

those file are compiled assets that 's cannot access from haproxy.
i just still confuse to add header or something else in haproxy config.

I have no idea what you are saying and what you expect haproxy to do.