# Haproxy 1.8, how to get virtual path url?

**URL:** <https://discourse.haproxy.org/t/haproxy-1-8-how-to-get-virtual-path-url/3323>\
**Category:** Help!\
**Created:** [December 16, 2018, 12:36pm UTC](https://discourse.haproxy.org/t/haproxy-1-8-how-to-get-virtual-path-url/3323 "2018-12-16T12:36:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkuliah](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@tkuliah](https://discourse.haproxy.org/u/tkuliah)\
**Post date:** [December 16, 2018, 12:36pm UTC](https://discourse.haproxy.org/t/haproxy-1-8-how-to-get-virtual-path-url/3323/1 "2018-12-16T12:36:24Z")

</div>

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](http://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-4de6c48f86c316cadff623630f535be12cf5021edde00f5ea950474dbd52e3cf.css)

[http://sub.domain.com/assets/application-4dc51ee3cd720797a149ee09f6d6f6648689420db499100dec4f29a5e25b1a89.js](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

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [December 16, 2018, 12:50pm UTC](https://discourse.haproxy.org/t/haproxy-1-8-how-to-get-virtual-path-url/3323/2 "2018-12-16T12:50:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tkuliah](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@tkuliah](https://discourse.haproxy.org/u/tkuliah)\
**Post date:** [December 16, 2018, 3:24pm UTC](https://discourse.haproxy.org/t/haproxy-1-8-how-to-get-virtual-path-url/3323/3 "2018-12-16T15:24:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [December 16, 2018, 6:26pm UTC](https://discourse.haproxy.org/t/haproxy-1-8-how-to-get-virtual-path-url/3323/4 "2018-12-16T18:26:47Z")

</div>

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