Skip to content

Instantly share code, notes, and snippets.

@priatmoko
Last active March 28, 2019 03:53
Show Gist options
  • Save priatmoko/490e9ee4303e857bbba51ee27f262c40 to your computer and use it in GitHub Desktop.
Save priatmoko/490e9ee4303e857bbba51ee27f262c40 to your computer and use it in GitHub Desktop.
Nginx configuration for laravel - adding special characters at the end of js file
Developing web app using vagrant is awesome. It make us ease to switch between one environtment to other.
But sometimes there are strange thing.In my case, I develope web application using laravel in
vagrant environtment (xenial ubuntu server and nginx). In half of development i found something strange.
My javascripts file didn't update directly when I change and there is special characters at the end of javascript.
After googling for hours, I got the solution.
Here is the solution.
1. Find nginx configuration /etc/nginx/nginx.conf
2. Open the file nginx.conf and find 'sendfile on' configuration, change it to sendfile off;
Find the screeenshoot on comment part.
@priatmoko
Copy link
Author

SC error on javascript file
error 1

SC Solution nginx.conf
error 2

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