MarvAmBass / docker-piwik

⚠️ DEPRECATED ::: A Docker Piwik Container
MIT License
29 stars 26 forks source link

Nginx - 403 Forbidden #21

Closed keltik85 closed 8 years ago

keltik85 commented 8 years ago

I am getting a 403 - Forbidden - nginx error when browsing to http://localhost:9002.

I installed a mysql-container like this (source: https://hub.docker.com/_/mysql/ ):

docker run --name mysqlcontainer -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest

Then I started the marvambass/piwik-container like this:

docker run -d -p 9002:80 -p 9003:443 --link mysqlcontainer:mysql --name piwik marvambass/piwik

This is the output of docker ps:

[root@localhost mysql]# docker ps
CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS                                         NAMES
39cb46ef28d5        marvambass/piwik         "/opt/entrypoint.sh n"   8 minutes ago       Up 8 minutes        0.0.0.0:9002->80/tcp, 0.0.0.0:9003->443/tcp   piwik
5cfa5b727c84        mysqlcontainer:latest      "/entrypoint.sh mysql"   10 minutes ago      Up 10 minutes       3306/tcp                                      mysqlcontainer

Now i browse to the container like this:

[root@localhost mysql]# lynx localhost:9002
Alert!: HTTP/1.1 403 Forbidden
 403 Forbidden
    _______
 nginx

My questions are:

  1. What have I done wrong?
  2. Which steps I need to do in order to configure the container properly?
Moredread commented 8 years ago

Does accessing localhost:9002/piwik work?

MarvAmBass commented 8 years ago

looks like moredread found the bug ;)

I'm closing this

-> in my opinion piwik normally runs aside the main root of a domain so it's not / by default you can change this behavieur by using a env variable