Skip to content

PHP+docker-imgproxy 500 Errsors #10

Closed Answered by shinsenter
Skorefin asked this question in Q&A
Discussion options

You must be logged in to vote

@Skorefin
Hi Bob,

After briefly looking through your source code, it seems you have changed the nginx document root from /home to /var/www/html, while your image files are located in /home and mounted to a ./www/ directory on the host machine.

nginx.conf

- set $html_root /home;
+ set $html_root /var/html/www;

docker-compose.yml

  imgproxy:
    volumes:
      - ./www:/home:cached

Therefore, when you access images within your HTML, it will by default look in the /var/www/html directory of the container, and the images were not there.

You can choose to copy all the images in the ./www/ directory over to your ./src/ directory (along with the php files), so imgproxy can find the image files. Y…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@Skorefin
Comment options

@shinsenter
Comment options

@shinsenter
Comment options

Answer selected by shinsenter
Comment options

You must be logged in to vote
1 reply
@shinsenter
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants