Nginx静态资源服务器配置

    科技2022-07-13  130

    nginx/conf/nginx.conf

    server { listen: 8081; server_name: resoure root C:/Users/cxc05/Desktop/resource autoindex on //可以查看resource下的目录 location / { add_header Access-Control-Allow-Origin * //允许跨域 } add_header Cache-Control "no-cache,must-revalidate" //不允许缓存,每次访问都要重新刷新 }
    Processed: 0.013, SQL: 8