Error 403 when trying to access the mainpage
Good day,
I am still fairly new with Docker, and I am very interested in doing this challenge.
Whenever I run "docker-compose up -d " I do not get any issues, the issues arise when I try to access "http://localhost/vapi/" it gives me a Forbidden error.
I was able to run it before but I do not remember what I did
I'm not sure where to head from there, does anyone know what I can do from here? I tried to run it as sudo but it did not helped at all.
Thank you
If it can help, I am running linux Mint
Can you answer the questions below?
Does http://localhost/ give a Laravel Default Page?
Can you post a screenshot of the Forbidden Error?
Try removing the -d flag from the docker-compose command This would allow you to see realtime logs on the terminal, Then try to access the page and see what comes up in the terminal or paste it here.
Thanks
Good Morning,
Thank you for the reply.
There is the image:

And here is the output. WARNING: The APP_NAME variable is not set. Defaulting to a blank string. WARNING: The PUSHER_APP_KEY variable is not set. Defaulting to a blank string. WARNING: The PUSHER_APP_CLUSTER variable is not set. Defaulting to a blank string. Starting vapi_db_1 ... done Starting vapi_www_1 ... done Starting vapi_phpmyadmin_1 ... done Attaching to vapi_db_1, vapi_phpmyadmin_1, vapi_www_1 db_1 | 2022-06-03 13:22:03+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1debian10 started. db_1 | 2022-06-03 13:22:16+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' db_1 | 2022-06-03 13:22:17+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1debian10 started. db_1 | 2022-06-03T13:22:18.360518Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead. db_1 | 2022-06-03T13:22:18.360593Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28) starting as process 1 db_1 | 2022-06-03T13:22:19.306877Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. www_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message phpmyadmin_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message www_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message phpmyadmin_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.4. Set the 'ServerName' directive globally to suppress this message db_1 | 2022-06-03T13:22:23.855875Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. www_1 | [Fri Jun 03 13:22:25.195760 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.7 configured -- resuming normal operations www_1 | [Fri Jun 03 13:22:25.248002 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND' phpmyadmin_1 | [Fri Jun 03 13:22:26.630722 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.52 (Debian) PHP/8.0.15 configured -- resuming normal operations phpmyadmin_1 | [Fri Jun 03 13:22:26.630760 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND' db_1 | 2022-06-03T13:22:28.072141Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. db_1 | 2022-06-03T13:22:28.072276Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. db_1 | 2022-06-03T13:22:28.139478Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. db_1 | 2022-06-03T13:22:28.501644Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock db_1 | 2022-06-03T13:22:28.501684Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.28' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL. www_1 | [Fri Jun 03 13:22:46.102931 2022] [autoindex:error] [pid 16] [client 172.18.0.1:33240] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive www_1 | 172.18.0.1 - - [03/Jun/2022:13:22:46 +0000] "GET / HTTP/1.1" 403 491 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0" www_1 | 172.18.0.1 - - [03/Jun/2022:13:22:46 +0000] "GET /favicon.ico HTTP/1.1" 404 487 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0" www_1 | [Fri Jun 03 13:22:59.124847 2022] [autoindex:error] [pid 17] [client 172.18.0.1:33250] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive www_1 | 172.18.0.1 - - [03/Jun/2022:13:22:59 +0000] "GET / HTTP/1.1" 403 491 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0" www_1 | 172.18.0.1 - - [03/Jun/2022:13:22:59 +0000] "GET /favicon.ico HTTP/1.1" 404 487 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0"
Should I move vapi to var/www/html/ ?
I think this is because of the recent docker-compose.yml change , Can you for now use this release https://github.com/roottusk/vapi/releases/tag/1.1
I will try to work on this issue
Thanks
@AndyG-0 Can you have a look at it ? It seems the new docker-compose.yml file has something to do with it
403 indicates a permission issue error. What is the current directory permissions does the user running docker have permission to read the current directory? I'm able to run the docker-compose using wsl2 and Ubuntu 20.04. @roottusk I'm assuming this works for you as well? Other than the file permissions, I'm not really sure what the issue could be since I can't reproduce.
@S0loW1ng Can you check your local file permissions and confirm that the docker group or docker user has access to that directory? I'm not sure what else to try other than that. Have you tested with other docker-compose web applications to see if they have the same issue?
Sorry I been really busy with work. I will give it a try and report back