# Deploy Dash on apache server \[solved!\]

**URL:** <https://community.plotly.com/t/deploy-dash-on-apache-server-solved/4855>\
**Category:** Dash Python\
**Created:** [July 8, 2017, 8:37pm UTC](https://community.plotly.com/t/deploy-dash-on-apache-server-solved/4855 "2017-07-08T20:37:40Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![chriddyp](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chriddyp/32/16855_2.png) [@chriddyp](https://community.plotly.com/u/chriddyp)\
**Post date:** [September 11, 2017, 5:27pm UTC](https://community.plotly.com/t/deploy-dash-on-apache-server-solved/4855/18 "2017-09-11T17:27:35Z")

</div>

> [@mjoo](#):
>
> There should be a configurable variable to set the path for the directory in the case that the Dash app isn’t hosted in the root url of the server.

This should be the `url_base_pathname`. Additionally, I have added two additional config properties:

- `routes_pathname_prefix` - This adds a prefix to the name of the backend routes that the server expects. This is initialized to `url_base_pathname`
- `requests_pathname_prefix` - This adds a prefix to the API calls that are made by the Dash front-end to the server. This is initialized to `url_base_pathname`

So, if your app is served under `/my-proxy/` but your proxy server removes the `/my-proxy/` prefix before forwarding the request to the underlying dash server, you can set

```auto
app.config.update({
    # as the proxy server will remove the prefix
    'routes_pathname_prefix': '/', 

    # the front-end will prefix this string to the requests
    # that are made to the proxy server
    'requests_pathname_prefix': '/my-proxy/'
})

```

However, if your proxy server does not remove this prefix before forwarding the requests, you can just set both of these variables to the same prefix.

These variables are new, so you’ll need to upgrade to the latest `dash` and `dash-renderer`:

```auto
pip install dash==0.18.3
pip install dash-renderer==0.9.0

```

---

_[View the full topic](https://community.plotly.com/t/deploy-dash-on-apache-server-solved/4855)._
