Run the app normally but UNABLE server on vps

I finally complete my app development, but the last hole I cannot resolve it out, wish someone to help me.

when I use this code on vps as my

import dash
import dash_bootstrap_components as dbc
from dash import Input, Output, dcc, html
from pages import project

app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP], suppress_callback_exceptions=True, title="Tractor2")
server = app.server
if __name__ == "__main__":

I recived the error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

but when I try run this on the vps:

python3 FlaskApp/

I got this feedback and it looks like correct:

Dash is running on

 * Serving Flask app '__init__'
 * Debug mode: on

Then, I try another like this:

import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
external_stylesheets = ['']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div([
    dcc.Input(id='my-id', value='initial value', type='text'),
    Output(component_id='my-div', component_property='children'),
    [Input(component_id='my-id', component_property='value')]
def update_output_div(input_value):
    return 'You\'ve entered "{}"'.format(input_value)
# nothing else needs changing except adding one more line code, like this
server = app.server
if __name__ == '__main__':

or this:

import dash
import dash_core_components as dcc
import dash_html_components as html

app = dash.Dash()

app.layout = html.Div(children=[
    html.H1(children='Dash Tutorials'),
            'data': [
                {'x': [1, 2, 3, 4, 5], 'y': [9, 6, 2, 1, 5], 'type': 'line', 'name': 'Boats'},
                {'x': [1, 2, 3, 4, 5], 'y': [8, 7, 2, 7, 3], 'type': 'bar', 'name': 'Cars'},
            'layout': {
                'title': 'Basic Dash Example'

server = app.server

if __name__ == '__main__':

both the 2 cods server run correct, but when I try my own code, I got error. sadly.

my folders is:

├── FlaskApp
│   ├──
│   ├──
│   ├── pages
│   │   ├──
│   │   └── __pycache__
│   ├── __pycache__
│   └── tractor2.db
├── FlaskApp.wsgi
└── tractor2.db