Open phtmgt opened 3 years ago
i'm also facing this issue ....
@prabhakaran-wac I gave up on this long time ago. No one from the community ever answered. I am now using upwardjs.
@magento export issue to JIRA project PWA as Bug
:x: Cannot export the issue. GitHub repo magento/magento2-upward-connector is not supported in JIRA project PWA and type Bug.
:x: Cannot export the issue. GitHub repo magento/magento2-upward-connector is not supported in JIRA project PWA and type Bug.
:x: Cannot export the issue. GitHub repo magento/magento2-upward-connector is not supported in JIRA project PWA and type Bug.
Was this thread any help: https://magentocommeng.slack.com/archives/C71HNKYS2/p1621105708128600
So, i've runned into this problem. What simple solution is, is to add an fastcgi_param in nginx.
For example look in the nginx.conf.sample file from the main magento2 repository and search for `# PHP entry point for main application location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check).php$ { try_files $uri =404; fastcgi_pass fastcgi_backend; fastcgi_buffers 1024 4k;
fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=18000";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}`
in this block you could add a fastcgi_param MAGENTO_BACKEND_URL = "example.com"
.
Restart nginx after this and it should work.
Unfortunately, the hosting provider we used had a custom nginx config that we could't update. So we had to make some modifications in the logic from this module. Would not recommend to do that, because a simple fastcgi_param should fix this problem ;).
Was this thread any help: https://magentocommeng.slack.com/archives/C71HNKYS2/p1621105708128600
This thread mentions a fix which I already tried. For me it is no good, as this is some static tweaked upward.yml file that introduces other issues.
@plamenh,
What was the error?
I'm facing the same error. Using Apache2 and generated upward.yml from running 'yarn build:dev'. Home page response: {"error":"No definition for env.MAGENTO_BACKEND_URL"}
I've tried to set the env in virtualhost definition, but no luck.
@slemos don't bother with this. just spin up an upwardjs server and call it a day.
@jerschipper The error was the same as the one @slemos received - {"error":"No definition for env.MAGENTO_BACKEND_URL"}. I tried the fastcgi params in the very beginning ( and all kinds of other params and env variables that I could think of, e.g. NODE_ENV, bash, etc.)
you can use my custom module
https://github.com/swissup/module-upward-connector
it added a custom config options
fastcgi_param don't need anymore
fastcgi_param MAGENTO_BACKEND_URL = "example.com"
.
It should be like this
fastcgi_param MAGENTO_BACKEND_URL "example.com";
This happens with the following upward.yml, generated by my (properly functioning in watch mode) instance:
On the other hand, this random upward.yml I found on stack exchange functions partially (opens homepage, the other pages are not working):
The fact the second one works makes me think the issue is not related to the env.MAGENTO_BACKEND_URL value, but I am no expert. Something related to the security headers maybe? My backend instance does not have a proper ssl certificate, might this be the issue?