Search code examples
nginxservicedigital-oceansudo

Why, I can't update my react app hosted on Digital Ocean?


I hosted my website on Digital Ocean and I installed Nginx to serve it, when I tried to update my react app it did not work I tried to restart Nginx with :

sudo service nginx restart

It did not work it is still the old version that is served so I removed the cache of Nginx with

sudo rm -rf /var/cache/nginx/

Then I restarted but it is still the old version so I tried to stop Nginx

sudo service nginx stop

Then

sudo service nginx  status

To see if it worked, and even if the status of Nginx is not active the web site is still working and the old version of the website is still here I tried several think like

sudo nginx -s stop
sudo nginx -s quit

same think , the old version is still here even when I shut off the digital ocean droplet(VM) the link to the website still work with the old version even if when I ping to it I don't have a response

please help me understand what is going on


Solution

  • Have you tried to clean the cache from your local browser?

    If you do not want to clean local browser cache, open a new browser in incognito mode.

    For debugging without risk of cache local, i would recommend open a browser in developer console (F12), change to tab network and click button disable cache.

    enter image description here

    The disable cache option is only active if developer console is open.