JS and CSS files in vagrant not properly encoded when saved outside of the VM

后端 未结 2 1373
小蘑菇
小蘑菇 2020-12-04 10:49

I\'m running vagrant on OSX, Ubuntu, and Windows 7 and using vim and Netbeans as IDEs on the host machine. The VM is running CentOS 6.3 and Apache 2.2. The docroot is set to

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 11:31

    It depends on what server you are using.

    For Nginx: in /etc/nginx/nginx.conf:

    change the line that contains sendfile on; to sendfile off;.

    For Apache: in /etc/httpd/conf/httpd.conf:

    change remove comment for EnableSendfile off;

    And don't forget restart your Nginx or Apache. If it still doesn't work, exit and vagrant reload or something like that - restart your VM.

提交回复
热议问题