码迷,mamicode.com
首页 > 其他好文 > 详细

NGINX静态文件模板

时间:2021-01-08 11:29:22      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:ast   error   files   dex   静态   main   ssl   name   tps   

server {
listen 80;
listen 443 ssl http2;
server_name www.baidu.com;
charset utf-8;
fastcgi_intercept_errors on;


include filter.forbid;

error_page 404 /404.html;
error_page 500 502 503 504 /500.html;


if ($server_port = 80 ) {
return 301 https://$host$request_uri;
}


add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";

ssl_certificate keys/baidu/server.crt;
ssl_certificate_key keys/baidu/server.key;

ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;

ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root /opt/lucky/admin/jbtest/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}

location ~ /\.ht {
deny all;
}
}

NGINX静态文件模板

标签:ast   error   files   dex   静态   main   ssl   name   tps   

原文地址:https://www.cnblogs.com/luoqiangdong/p/14244061.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!