Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Turn Sendfile to "off" for vagrant boxes
# A VirtualBox bug forces vagrant to serve
# corrupt files via Apache or nginx
# The solution to that would be to turn off
# the SendFile option in apache or nginx
#
# If you use apache as your main web server
# add this directive in your httpd.conf (or apache.conf)
# configuration file name may vary in various systems
#
EnableSendfile off
# If you use nginx as your main web server
# add this directive in your nginx.conf
sendfile off
@franklinrony

This comment has been minimized.

Show comment
Hide comment
@franklinrony

franklinrony Mar 28, 2016

Thank you mate. This fix a issue with css file.

Thank you mate. This fix a issue with css file.

@simonmilz

This comment has been minimized.

Show comment
Hide comment
@simonmilz

simonmilz Jun 13, 2016

Thanks a lot 👍

Thanks a lot 👍

@maykelsb

This comment has been minimized.

Show comment
Hide comment

Great!

@DeRain

This comment has been minimized.

Show comment
Hide comment
@DeRain

DeRain Aug 3, 2016

Thank you!

DeRain commented Aug 3, 2016

Thank you!

@James-Lam

This comment has been minimized.

Show comment
Hide comment
@James-Lam

James-Lam Oct 25, 2016

If sendfile is on, it may causes css or js files cached. I had encountered a problem that even thought I disable cache on chrome, css files were still cached. Turn sendfile to "off" solves this problem.

If sendfile is on, it may causes css or js files cached. I had encountered a problem that even thought I disable cache on chrome, css files were still cached. Turn sendfile to "off" solves this problem.

@iamsteadman

This comment has been minimized.

Show comment
Hide comment
@iamsteadman

iamsteadman Aug 6, 2017

I think there may be a continuing error with this. I'm using Ubuntu 14.04, Vagrant 1.9.7 and VirtualBox 5.1.2.6, and no amount of setting sendfile off in nginx has any effect

I think there may be a continuing error with this. I'm using Ubuntu 14.04, Vagrant 1.9.7 and VirtualBox 5.1.2.6, and no amount of setting sendfile off in nginx has any effect

@zbennett10

This comment has been minimized.

Show comment
Hide comment
@zbennett10

zbennett10 Aug 12, 2017

This helped me get stuff working with Docker Toolbox - thanks a ton!

This helped me get stuff working with Docker Toolbox - thanks a ton!

@junibrosas

This comment has been minimized.

Show comment
Hide comment

Great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment