CSS file on Vagrant VM is not refreshed

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

CSS file on Vagrant VM is not refreshed

James Newton
Hello Vagrant visionaries,

I have used Vagrant to create a virtual machine running Ubuntu 16.04 and nginx. As I described in this thread, I have set up synchronized folders in the Project folder to point at /etc/nginx/ and at /var/www/. I have set the virtual machine up with a static IP address, and created an example.com site on it.

When I change one of the HTML files in /var/www/example.com/html/, and reload that file in my browser, I see the changes immediately. However, when I update an external CSS file that the HTML page needs to load, I cannot see the changes until I run `vagrant reload`.

It is not enough to reload the nginx settings or to restart nginx: I must force the entire VM to reload. I have also checked that the problem is not due to the browser caching the CSS page. I have disabled caching, and when I load the same page using nginx running on the host machine, the CSS changes appear immediately.

Is this a known issue? Can you suggest a solution or a workaround?

Thanks in advance,

James

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/4dc0e7d4-0a31-4624-a6a9-b617155ea082%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: CSS file on Vagrant VM is not refreshed

Alvaro Miranda Aguilera
hello

The isse is on the shared folder from virtualbox. As its not a filesystem, is beaves pretty good for some use cases but not so good for others.

I can't tell whats the best workflow but for some people using rsync to sync from host to guest has been good, for others use nfs also works.

Alvaro

On Fri, Sep 15, 2017 at 2:03 PM, James Newton <[hidden email]> wrote:
Hello Vagrant visionaries,

I have used Vagrant to create a virtual machine running Ubuntu 16.04 and nginx. As I described in this thread, I have set up synchronized folders in the Project folder to point at /etc/nginx/ and at /var/www/. I have set the virtual machine up with a static IP address, and created an example.com site on it.

When I change one of the HTML files in /var/www/example.com/html/, and reload that file in my browser, I see the changes immediately. However, when I update an external CSS file that the HTML page needs to load, I cannot see the changes until I run `vagrant reload`.

It is not enough to reload the nginx settings or to restart nginx: I must force the entire VM to reload. I have also checked that the problem is not due to the browser caching the CSS page. I have disabled caching, and when I load the same page using nginx running on the host machine, the CSS changes appear immediately.

Is this a known issue? Can you suggest a solution or a workaround?

Thanks in advance,

James

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/4dc0e7d4-0a31-4624-a6a9-b617155ea082%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eywoFePpc-X9ZWwONjOx__xAFqBoAHRrLXnG-Mbt4T3bA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: CSS file on Vagrant VM is not refreshed

James Newton
On 15 September 2017 at 17:07, Alvaro Miranda Aguilera <[hidden email]> wrote:
The issue is on the shared folder from virtualbox. As it's not a filesystem, it behaves pretty good for some use cases but not so good for others.

I can't tell what's the best workflow but for some people using rsync to sync from host to guest has been good, for others use nfs also works.

Hi Alvaro,

I appreciate your follow up.

Would you have more specific details on how rsync and nfs should be used in this case? Is this run from the command line, or as part of a script that detects changes to any file in a given folder?

Thanks for your dedication :)

James

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAGNcf%2BGFv4rWXorq1EJAwBzdG%2BH67j2xgpzycwqkPiWjPWJ83g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: CSS file on Vagrant VM is not refreshed

Alvaro Miranda Aguilera
Hello!

So first suggestion would be have a look at this at time permits:

Then lets reuse something other people have wrote about this very same problem:

Or:

That should give a wide idea on why one is faster/better/stronger (technologic)

From there, implement one or the other, will depend on your host OS and guest OS

Can you share what are you using today? 

Whats your host OS ?
Whats your guest VM OS ?

Thanks!
Alvaro

On 15 Sep 2017, 16:33 +0200, James Newton <[hidden email]>, wrote:
On 15 September 2017 at 17:07, Alvaro Miranda Aguilera <[hidden email]> wrote:
The issue is on the shared folder from virtualbox. As it's not a filesystem, it behaves pretty good for some use cases but not so good for others.

I can't tell what's the best workflow but for some people using rsync to sync from host to guest has been good, for others use nfs also works.

Hi Alvaro,

I appreciate your follow up.

Would you have more specific details on how rsync and nfs should be used in this case? Is this run from the command line, or as part of a script that detects changes to any file in a given folder?

Thanks for your dedication :)

James

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAGNcf%2BGFv4rWXorq1EJAwBzdG%2BH67j2xgpzycwqkPiWjPWJ83g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/71001500-4272-4b23-ab98-f1ebc0e29096%40Spark.
For more options, visit https://groups.google.com/d/optout.