英文:
Magento2: 503: No ddev back-end site available
问题
我正在尝试在我的Linux机器上安装Magento。我正在使用ddev快速启动Magento。https://ddev.readthedocs.io/en/stable/users/quickstart/#magento-2
在运行ddev launch
时,我遇到以下错误:
503:没有可用的ddev后端站点。
这是ddev-router容器:在您指定的URL上没有后端Web服务器。您可能希望使用"ddev start"来启动站点。
最初,在启动时我遇到了404 nginx错误,然后我运行了以下命令。
ddev poweroff
docker rm -f $(docker ps -aq)
ddev restart
上述操作解决了404错误,但现在我看到了503错误。我已经尝试了以下内容故障排除中的步骤:
ddev poweroff
docker rm -f $(docker ps -aq)
ddev debug dockercheck
ddev debug test
- 重启Docker
- 尝试最简单的DDEV项目
sudo service nginx stop
sudo apachectl stop
- 方法2:通过配置项目使用不同的端口来解决端口冲突
sudo lsof -i :443 -sTCP:LISTEN
sudo lsof -i :8443 -sTCP:LISTEN (EMPTY)
我的.ddev/config.yaml
文件看起来像这样。
我正在使用Docker CE,而不是Docker Desktop。我正在使用以下Ubuntu版本:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
由于文件名加密问题,Magento文件夹位于主目录之外。错误
英文:
I am trying to install magento on my linux machine. I am using ddev quick start for magento . https://ddev.readthedocs.io/en/stable/users/quickstart/#magento-2
I am getting the following error for ddev launch
:
503: No ddev back-end site available.
This is the ddev-router container: There is no back-end webserver at the URL you specified. You may want to use "ddev start" to start the site.
I was initially encountreing 404 nginx errors upon launching, after which I ran the following.
ddev poweroff
docker rm -f $(docker ps -aq)
ddev restart
The above resolved the 404 error. But now I am seeing the 503.
I have tried the following things from the troubleshooting --
- ddev poweroff
docker rm -f $(docker ps -aq) - ddev debug dockercheck
- ddev debug test
- Restart Docker
- Try the simplest possible DDEV project
- sudo service nginx stop
- sudo apachectl stop
- Method 2: Fix port conflicts by configuring your project to use different ports
- sudo lsof -i :443 -sTCP:LISTEN
- sudo lsof -i :8443 -sTCP:LISTEN (EMPTY)
my .ddev/config.yaml file looks like this
I am using docker ce, not docker desktop. I am using ubuntu with the following details--
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
Due to issues with filename encryption, the magento folder resides outside the home directory.
答案1
得分: 0
这个问题已经在 DDEV Discord 中解决了。
尽管这里没有列出,但你试图使用 URL https://245.ddev.site:8443
创建项目,但你已经按照 https://ddev.readthedocs.io/en/latest/users/quickstart/#magento-2 中的大部分步骤进行操作。
你遇到的问题是,magento2
和 wordpress
在数据库配置中嵌入了 URL,所以在设置 magento2 时必须使用你想要的确切 URL。
你使用了以下命令:ddev magento setup:install --base-url='https://ddev-magento2.ddev.site/' --cleanup-database --db-host=db --db-name=db --db-user=db --db-password=db --elasticsearch-host=elasticsearch --search-engine=elasticsearch7 --elasticsearch-port=9200 --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com --admin-user=admin --admin-password=admin123 --language=en_US
(特别是 --base-url='https://ddev-magento2.ddev.site/''
),但不幸的是,你创建了一个 URL 为 https://245.ddev.site:8443
的项目。
所以你通过更改设置为以下内容来解决了这个问题:ddev magento setup:install --base-url='https://245.ddev.site:8443/'' --cleanup-database --db-host=db --db-name=db --db-user=db --db-password=db --elasticsearch-host=elasticsearch --search-engine=elasticsearch7 --elasticsearch-port=9200 --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com --admin-user=admin --admin-password=admin123 --language=en_US
。
在你这样做之前,每当你访问 index.php,magento2 都会重定向到其规范的 URL,https://ddev-magento2.ddev.site/
... 当然,在 DDEV 中没有进行配置,所以你会得到 503: No ddev back-end site available
。
英文:
This was sorted out in DDEV Discord
It wasn't listed here, but you were trying to create a project with the URL https://245.ddev.site:8443
but you had followed (most of the) steps of the instructions in https://ddev.readthedocs.io/en/latest/users/quickstart/#magento-2
The problem you had is that magento2
and wordpress
embed the URL inside the database configuration, so you have to use the exact URL you want when setting up magento2.
You used ddev magento setup:install --base-url='https://ddev-magento2.ddev.site/' --cleanup-database --db-host=db --db-name=db --db-user=db --db-password=db --elasticsearch-host=elasticsearch --search-engine=elasticsearch7 --elasticsearch-port=9200 --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com --admin-user=admin --admin-password=admin123 --language=en_US
(especially --base-url='https://ddev-magento2.ddev.site/'
) but unfortunately you were creating a project with the URL https://245.ddev.site:8443
So you fixed this by changing the setup to ddev magento setup:install --base-url='https://245.ddev.site:8443/' --cleanup-database --db-host=db --db-name=db --db-user=db --db-password=db --elasticsearch-host=elasticsearch --search-engine=elasticsearch7 --elasticsearch-port=9200 --admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com --admin-user=admin --admin-password=admin123 --language=en_US
Before you did this, whenever you would land on the index.php magento2 would redirect to its canonical URL, https://ddev-magento2.ddev.site/
... which of course was not configured in DDEV, so you got the 503: No ddev back-end site available
.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论