您当前的位置: 首页 >  nginx

壹小俊

暂无认证

  • 2浏览

    0关注

    885博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

学习nginx配置

壹小俊 发布时间:2020-03-24 11:24:42 ,浏览量:2

fastcgi_intercept_errors on;

server {     listen  80;     server_name www.abc.com;     rewrite ^(.*)$  https://$host$1 permanent; } server {     listen       443;     server_name  www.abc.com;     root   html/www;     index  index.php index.html index.htm;       #https证书     ssl on;     ssl_certificate /application/nginx/conf/key/server.crt;     ssl_certificate_key /application/nginx/conf/key/server.key;       #访问日志     access_log  logs/access_www.log  main;       #隐藏版本号     server_tokens on;       ##防盗链     #location ~* .*\.(jpg|gif|swf|flv|wma|wmv|asf|mp3|mmf|zip|rar)$ {      #小括号中不能包含要跳转的图片结尾格式.png,-->否则会进入死循环跳转     #    valid_referers none blocked *.abc.com abc.com www.abc.com;     #    if ($invalid_referer) {     #       #return 403;     #       rewrite ^/  https://www.abc.com/

关注
打赏
1664335782
查看更多评论
立即登录/注册

微信扫码登录

0.0397s