nginx 静态资源访问配置
来源:互联网 发布:网络言情小说作家 编辑:程序博客网 时间:2024/05/21 06:46
server {
listen 443;
server_name localhost;
ssl on;
# index weixin/index.html;
# rewrite ^/ https://www.baidu.com
# location / {
# root html;
# index index.html index.htm;
# }
# 配置所有的静态资源访问路径
location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
{
root html/weixin; #目录
index index.html;
#expires定义用户浏览器缓存的时间为1天,如果静态页面不常更新,可以设置更长,这样可以节省带宽和缓解服务器的压力
expires 1d;
listen 443;
server_name localhost;
ssl on;
# 此处可配置域名访问,默认的首页
# root html; #目录# index weixin/index.html;
# rewrite ^/ https://www.baidu.com
# location / {
# root html;
# index index.html index.htm;
# }
# 配置所有的静态资源访问路径
location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
{
root html/weixin; #目录
index index.html;
#expires定义用户浏览器缓存的时间为1天,如果静态页面不常更新,可以设置更长,这样可以节省带宽和缓解服务器的压力
expires 1d;
}
}
阅读全文
0 0
- nginx 静态资源访问配置
- nginx配置静态资源,访问返回403
- Nginx 静态资源访问
- nginx 配置静态资源
- nginx配置静态资源地址
- nginx静态资源缓存配置
- nginx配置-优化静态资源
- Nginx静态资源简单配置
- Nginx配置缓存静态资源
- nginx动态访问静态资源,图片服务器配置2中方式,tomcat访问图片
- Nginx访问静态文件配置
- ngnix静态资源访问配置
- SpringMVC配置静态资源访问
- SpringMVC配置静态资源访问
- apache 配置静态资源访问
- springMvc配置静态资源访问
- ngnix静态资源访问配置
- nginx--静态访问图片资源(Banner)
- cdq分治
- 用SVD压缩深度模型(DNN,CNN)的全连接层(fully-connected layer)
- 产品流程
- 【开始】总要写点啥
- 添加图片水印
- nginx 静态资源访问配置
- Greenplum 分区表介绍
- HDU 1385 Minimum Transport Cost(floyd)(记录路径)
- Windows 下单机最大TCP连接数
- Java软件工程师 (职业简介)
- 利用JDB附加调试JAVA程序
- stm32 死区 刹车 pwm
- CNN的压缩和加速
- js常用正则表达式