# Sub Domain routing

**URL:** <https://discourse.haproxy.org/t/sub-domain-routing/8310>\
**Category:** Help!\
**Created:** [January 15, 2023, 8:00pm UTC](https://discourse.haproxy.org/t/sub-domain-routing/8310 "2023-01-15T20:00:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayj00](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@rayj00](https://discourse.haproxy.org/u/rayj00)\
**Post date:** [January 15, 2023, 8:00pm UTC](https://discourse.haproxy.org/t/sub-domain-routing/8310/1 "2023-01-15T20:00:36Z")

</div>

How would I configure my back end if I come in with a sub domain xxx.xxx.xxx but I need to  
access /usr/share/www/index.php?

Ideas?

Thanks,  
Ray

---

<div class="post-metadata">

**Author:** ![stormrover](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/stormrover/32/1847_2.png) [@stormrover](https://discourse.haproxy.org/u/stormrover)\
**Post date:** [January 20, 2023, 5:01pm UTC](https://discourse.haproxy.org/t/sub-domain-routing/8310/2 "2023-01-20T17:01:28Z")

</div>

[HAProxy is not](https://docs.haproxy.org/2.6/intro.html#3.1):

- a static web server : during startup, it isolates itself inside a chroot  
jail and drops its privileges, so that it will not perform any single file-  
system access once started. As such it cannot be turned into a static web  
server (dynamic servers are supported through FastCGI however). There are  
excellent open-source software for this such as Apache or Nginx, and  
HAProxy can be easily installed in front of them to provide load balancing,  
high availability and acceleration.
