on 11-29-2023 11:37 AM
Hi Experts,
I am trying to deploy SSR Spartacus code in Hybris CCV2. the code works perfectly in local but after it is deployed in CCV2, i can only access the site using https://example.com/index.html
. I get below error in the log when i try to access the site using https://example.com
or https://example.com/powertools-spa/en/USD/
.
Error 1:
"log": "2023/11/09 14:25:15 [error] 15#15: *42641 connect() failed (111: Connection refused) while connecting to upstream, client: 10.244.0.60, server: ~^.my-app.$, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:4200/", host: "example.com"",
Error 2:
Please help me resolve this problem."log": "2023/11/09 14:25:15 [error] 15#15: *42641 open() "/usr/share/nginx/html/50x.html" failed (2: No such file or directory), client: 10.244.0.60, server: ~^.my-app.$, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:4200/", host: "example.com"",
Hello,
Hope you are doing well.
The problem might be how the JS Storefront manifest file is configured. If you are using client side rendering you must follow the example below and point the webroot to where index.html file is located, just like below:
{
"name": "myApp",
"path": "myApp",
"ssr": {
"enabled": true,
"path": "dist/myApp/server/main.js"
},
"csr": {
"webroot": "dist/myApp/browser/"
},
"enabledRepositories": ["spartacus-6"]
},
Let me know if that works for you ;).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.