# Can't correctly deploy Dash 1.4.0 to CentOS Apache server, webpage stays in uploading state, why?

**URL:** <https://community.plotly.com/t/cant-correctly-deploy-dash-1-4-0-to-centos-apache-server-webpage-stays-in-uploading-state-why/29917>\
**Category:** Dash Python\
**Created:** [October 11, 2019, 2:26pm UTC](https://community.plotly.com/t/cant-correctly-deploy-dash-1-4-0-to-centos-apache-server-webpage-stays-in-uploading-state-why/29917 "2019-10-11T14:26:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Artyom8](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@Artyom8](https://community.plotly.com/u/Artyom8)\
**Post date:** [October 11, 2019, 2:26pm UTC](https://community.plotly.com/t/cant-correctly-deploy-dash-1-4-0-to-centos-apache-server-webpage-stays-in-uploading-state-why/29917/1 "2019-10-11T14:26:03Z")

</div>

I create the following small app with Dash 1.4.0 and Flask 1.0.2, please find it below. I was able to deploy it to Centos Apache server, it starts but the only stuff I get is a loading page, in browser console I see that some components are absent, please see printscreen (I deleted ip of my server in the picture), what should I do to solve the issue?

Console in Chrome browser:

 ![1](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/7/72cdd731d720a5c732776998997701db7cf71008.png)

Code:

```auto
from libs.initsetup import InitSetup
import libs.dbops as dbops
import os
import dash
import dash_core_components as dcc
import dash_html_components as html
from flask_caching import Cache
from flask import Flask

on_server = True

if not on_server:
    WORKDIR = ""
else:
    WORKDIR = "/var/www/mosregwebsite_dash_plot"

external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
server = Flask( __name__ )

dash_app = dash.Dash( __name__ , server=server)

dash_app.scripts.config.serve_locally = True
dash_app.css.config.serve_locally = True

cache = Cache(dash_app.server, config={
    'CACHE_TYPE': 'filesystem',
    'CACHE_DIR': WORKDIR + os.path.join(os.getcwd(), 'cache-directory')
})

TIMEOUT = 1800 # plots are updated every 30 minutes

@cache.memoize(timeout=TIMEOUT)
def return_layout():
    clients = InitSetup.read_initfile_json(WORKDIR + os.path.join(os.getcwd(), "jsons", "clients.json"))
    HOST, DBUSER, DBPASSWORD, AUTH_PLUGIN, *rest = InitSetup.read_mysql_init_config_file(WORKDIR +
        os.path.join(os.getcwd(), "mosregwebsite_dash_plot.config.txt"))

    conn, curs = dbops.create_mysql_connection(HOST, DBUSER, DBPASSWORD, AUTH_PLUGIN)

    graphs = []
    for k, v in clients.items():
        x, y = dbops.select_data_for_pictures(curs, k)
        graphs.append({'x': x, 'y': y, 'type': 'lineplot', 'name': v})

    return html.Div(children=[
        dcc.Graph(
            style={
                'textAlign': 'center',
                'height': '900px',
            },
            id='example-graph',
            figure={
                'data': graphs,
                'layout': {
                }

            }
        )
    ])

dash_app.layout = return_layout

if __name__ == ' __main__':
    os.mkdir("numbeo")
    if not on_server:
        dash_app.run_server(host='127.0.0.107', port=8999, debug=False)
    else:
        HOST, PORT = InitSetup.read_website_settings_from_config_file(
            WORKDIR + os.path.join(os.getcwd(), "mosregwebsite_dash_plot.config.txt"))
        dash_app.run_server(host=HOST, port=int(PORT), debug=False)

```

This is my WSGI File:

```auto
import sys
import os
activate_this = '/var/www/mosregwebsite_dash_plot/env/bin/activate_this.py'
with open(activate_this) as file_:
    exec(file_.read(), dict( __file__ =activate_this))
sys.path.insert(0, '/var/www/mosregwebsite_dash_plot/')

from mosregwebsite_dash_plot import server as application

```

This is setup.py

```auto
from setuptools import setup

setup(
    name='mosreg_webscrap_website',
    version='1.0.0',
    packages=[''],
    url='',
    license='',
    author='kozyrev.av',
    author_email='kozirev8@gmail.com',
    description='This is website which display processed information from mosreg website',
    install_requires=[
        'dash==1.4.0',
        'Flask-Caching==1.7.2',
        'mysql-connector==2.2.9',
        'mysql-connector-python==8.0.16',
        'flask==1.0.2'
    ]
)

```

---

<div class="post-metadata">

**Author:** ![Artyom8](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@Artyom8](https://community.plotly.com/u/Artyom8)\
**Post date:** [October 14, 2019, 5:38am UTC](https://community.plotly.com/t/cant-correctly-deploy-dash-1-4-0-to-centos-apache-server-webpage-stays-in-uploading-state-why/29917/2 "2019-10-14T05:38:25Z")

</div>

Hello, please any suggest?
