Skip to content

Problems with boot2docker / sendfile #17

@nekaab

Description

@nekaab

Hi,

I wasted 3 hours on this, so maybe this helps someone:

Nginx was serving stale / old files, only solveable by restarting the boot2docker vm. I blamed nginx, apparently wrongly so.

After a lot of different approaches, I stumbled upon https://jeremyfelt.com/2013/01/08/clear-nginx-cache-in-vagrant/ . I changed the nginx.conf as such:

docker run --rm -t -i fbaaken/nginx-php /sbin/my_init -- bash -l
root@0e96ebfdb15b:/# vi /etc/nginx/nginx.conf
(Edited to sendfile off;)
(Committed container state to new image so to not lose changes)
(Ran from the new image from then on)

Hope this helps someone. I will keep the issue open, maybe there is a way to make this easier to configure when running the container so we can sue the same on in dev / prod environments when it's not running on a Virtualbox image (sendfile should be on in this case).

Best,

Felix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions