search

Home  >  Q&A  >  body text

nginx caches js, css, images and other information. What is the implementation principle?

nginx caches js, css, pictures and other information. What is the implementation principle?

高洛峰高洛峰2791 days ago1069

reply all(1)I'll reply

  • PHPz

    PHPz2017-05-16 17:25:04

    http://nginx.org/cn/docs/http/ngx_http_proxy_module.html
    For example, there is a Tomcat server behind Nginx, and the project is deployed on the Tomcat server. Nginx forwards all requests to the Tomcat server through proxy_pass, and Tomcat returns data to Nginx. If Nginx is configured with proxy_cache, Nginx will return the js/js returned by Tomcat according to the configuration. css/img is cached in the file system (proxy_cache_path) of the server where Nginx is located.

    reply
    0
  • Cancelreply