百度云BCH简单的conf文件设置

www.jswusn.com 服务器 2020-02-16 14:10:09 2571次浏览

  bcloud_nginx_user.conf为用户自定义配置文件。用户可在程序根目录下,创建bcloud_nginx_user.conf文件,在文件里写入自定义配置。BCH支持server级别以下的自定义配置。


  pbootcms伪静态设置

{pboot:pre}

#1.X版本使用如下规则:
location / {
 if (!-e $request_filename){
  rewrite ^/(.*)$ /index.php/$1 last;
 }
}

#2.X+版本使用如下规则:
location / {
 if (!-e $request_filename){
  rewrite ^/(.*)$ /index.php?p=$1 last;
 }
}

{/pboot:pre}


  禁止访问模板目录下的以 .html 结尾的文件

{pboot:pre}

location ~ ^/(template)/.*.(html)$ {
 deny all;
}

{/pboot:pre}


  禁止访问某些系统文件

{pboot:pre}

location ~* .(ini|cfg|dwt|lbi|rar|gz|tar|sql)$ {    
 deny all;    
}

{/pboot:pre}


  以上为苏州网站建设常用的一些百度云BCH的conf设置,之后再有别的设置,我会继续更新。。。

苏南名片

  • 电话:152-1887-1916
  • 邮箱:message@jswusn.com
  • 地址:江苏省苏州市相城区

Copyright © 2018-2024 jswusn.com 版权所有

技术支持:苏州网站建设  苏ICP备18036849号