Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

How To Clean Nginx Cache?

$
0
0

Hello there,

I uploaded the new version of my ASP.NET Core website that I published with Nginx via FTP. But still the old version appears on the air. I updated the files, but the files were not updated on the Nginx side.

How do you know that you can say that it is not updated. I published my site with incorrect database information in appsettings.json file. I entered the correct information and reloaded the appsettings.json file, but no change was made. I misspelled some javascript files I called, I changed them, but they were not updated again.

You can say delete browser history. I deleted it, but the problem persists. I want the features like Cache and gzip to remain active in terms of site speed. But after publishing an update, I want to delete cache and continue with the new version. I would be glad if you could help.

Nginx/sites-available/default 

server {
	listen 80 default_server;
	listen [::]:80 default_server ipv6only=on;

	server_name sansurlu.com www.sansurlu.com;

	root /var/www/sansurlu;
	index index.html;


 gzip  on;
    gzip_http_version 1.1;
    gzip_vary on;
    gzip_comp_level 6;
    gzip_proxied any;
    #gzip_types text/plain text/html text/css application/json application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml;
    gzip_buffers 16 8k;
    gzip_disable “MSIE [1-6].(?!.*SV1)”;



	location ~* /(css|js) {
		root /var/www/sansurlu/wwwroot;		
	}

	location ~/assets/images {
		root /var/www/sansurlu/wwwroot;
	}

	location ~/assets/font-awesome{
		root /var/www/sansurlu/wwwroot;
	}

 location / {
 proxy_pass http://localhost:5000;
 proxy_http_version 1.1;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection keep-alive;
 proxy_set_header Host $host;
 proxy_cache_bypass $http_upgrade;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forwarded-Proto $scheme;
 }

}


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>