Long M K Nguyễn
Long M K Nguyễn

Reputation: 817

Docker: How to change php-fpm conf

I just started using Docker and still not used to it yet. I added images from https://github.com/markoshust/docker-magento

However when i tried to run magento setup page, i see these errors:

phpfpm_1  | - -  12/Jun/2018:18:49:04 +0000 "GET /setup/index.php/navigation" 403
phpfpm_1  | [12-Jun-2018 18:49:04] WARNING: [pool www] child 8 said into stderr: "NOTICE: Access to the script '/var/www/html/setup/index.php/navigation' has been denied (see security.limit_extensions)"
app_1     | 2018/06/12 18:49:04 [error] 7#7: *1 FastCGI sent in stderr: "Access to the script '/var/www/html/setup/index.php/navigation' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 172.18.0.1, server: localhost, request: "GET /setup/index.php/navigation HTTP/1.1", upstream: "fastcgi://unix:/sock/docker.sock:", host: "magento2.test", referrer: "http://magento2.test/setup/"

A little search online suggests changing the config in www.conf but i'm not sure how to do that with Docker, i tried editing the image's template and deleted the containers and try creating the containers again but still getting these errors. How can i verify the configs are correct and if i'm doing it wrong how to correctly change the config files? Thanks

Upvotes: 0

Views: 1723

Answers (1)

Fábio Correia
Fábio Correia

Reputation: 613

You may access the container using docker exec and do whatever you want.

Example:

docker container exec -it <container_id> bash

If still you don't have permissions to change folders or files, try using -u root.

Example:

docker container exec -u root -it <container_id> bash

You may also do a bind mount to the container folder.

Example:

docker container run -v /host/folder:/container/folder <image>

This will map all contents and put on your host for easy updating files.

Upvotes: 1

Related Questions