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 --
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.
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
.