apache - ProxyPass to mean app -


i wrote mean app. till node.js server serving angular2 content. including following lines in app.js:

app.use(express.static('./client')); app.use(express.static('./client/src')); 

the app works fine. host app on server behind apache2: did adding line in virtualhost configuration:

proxypass /path http://127.0.0.1:3000 proxypassreverse /path http://127.0.0.1:3000 

when browse https://www.myserver.com/path get:

get https://www.myserver.com/path --> request ok , returns index.html

but requests css js files failing because looked them in wrong path like:

get https://www.myserver.com/styles.css --> fails (404 file not found)

it should

get https://www.myserver.com/path/styles.css

how can fix this? planned under different paths (/path1,path2,...) different mean apps running in future.

thanks help

i stupid. had change

<base href="/">  

to

<base href="path"> 

in index.html of angular app


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -