docker icon indicating copy to clipboard operation
docker copied to clipboard

404 not found when trying the nginx example

Open Midnighter opened this issue 4 years ago • 4 comments

I tried running the nginx example locally. I have made some slight modifications to it:

I've set the passwords in the db.env file.

MYSQL_ROOT_PASSWORD=super-secret
MYSQL_PASSWORD=secret
MYSQL_DATABASE=matomo
MYSQL_USER=matomo
MATOMO_DATABASE_ADAPTER=mysql
MATOMO_DATABASE_TABLES_PREFIX=matomo_
MATOMO_DATABASE_USERNAME=matomo
MATOMO_DATABASE_PASSWORD=secret
MATOMO_DATABASE_DBNAME=matomo

I have established the dependencies in the docker-compose.yml.

services:
  app:
-    links:
+    depends_on:
       - db

  web:
+    depends_on:
+      - app

I start the stack with docker-compose up -d, logs look fine but when I go to localhost:8080 in my browser I get the following behaviour:

  1. I'm immediately redirected to /auth
  2. I get an nginx error 404 Not Found. Log entry:
web_1  | 192.168.80.1 - - [15/Sep/2020:13:02:04 +0000] "GET /auth/ HTTP/1.1" 404 555 "http://localhost:8080/"

Does anyone have a clue how to fix this, please?

Midnighter avatar Sep 15 '20 13:09 Midnighter

could you work it out?

ilyastuit avatar Feb 01 '21 17:02 ilyastuit

I resorted to the Apache image which worked fine for me out of the box. I was unable to identify the cause for this one.

Midnighter avatar Feb 01 '21 18:02 Midnighter

I resorted to the Apache image which worked fine for me out of the box. I was unable to identify the cause for this one.

Thanks for quick response.

sudo chmod -R 755 /var/www/html

It worked for me.

ilyastuit avatar Feb 01 '21 21:02 ilyastuit

Cheers, I'll give that a try 🙂

Midnighter avatar Feb 01 '21 23:02 Midnighter