0

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

  1. ddev poweroff docker rm -f $(docker ps -aq)
  2. ddev debug dockercheck
  3. ddev debug test
  4. Restart Docker
  5. Try the simplest possible DDEV project
  6. sudo service nginx stop
  7. sudo apachectl stop
  8. Method 2: Fix port conflicts by configuring your project to use different ports
  9. sudo lsof -i :443 -sTCP:LISTEN
  10. 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.

Error

rfay
  • 9,963
  • 1
  • 47
  • 89
jazyac
  • 3
  • 2
  • 503 is almost always a result of having the docroot wrong. Check to see if the docroot in .ddev/config.yaml matches the directory where your index.php is. (You have "pub" I see; is that the correct relative directory, and does it have index.php inside it? – rfay Jun 12 '23 at 02:49
  • I see that `ddev debug test` works fine, so the problem is most likely your docroot. Your docroot must be inside the project. – rfay Jun 12 '23 at 02:51
  • Try the 127.0.0.1 URL that `ddev start` gives you and see if that one works. For unusual problems like you have been having I encourage you to come over to Discord, where interactive support is a lot easier. https://discord.gg/hCZFfAMc5k – rfay Jun 12 '23 at 12:52
  • Thanks for the suggestion @rfay. As my config.yaml shows in the description, the docroot is 'pub'. There is indeed an index.php file inside pub. – jazyac Jun 12 '23 at 21:52

1 Answers1

0

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.

rfay
  • 9,963
  • 1
  • 47
  • 89