欢迎光临IT网Linux学习频道

当前位置: > Linux服务器 >
  • [nginx] nginx禁止未绑定域名访问 日期:2014-12-08 12:13:39 点击:94 好评:0

    nginx 只允许某些域名访问 其他一律不能访问 ,是怎么写的? 对于这个问题可以参考官方文档 原文 In catch-all server examples the strange name _ can be seen: server { listen 80 default_server; server_name _; return 444;} There is nothing special...

  • [nginx] nginx开机自动启动脚本 日期:2014-12-08 12:13:16 点击:194 好评:0

    把以下脚本保存为nginx文件放入/etc/init.d/nginx 然后可以通过 /etc/init.d/nginx start 命令启动nginx /etc/init.d/nginx stop 命令停止nginx /etc/init.d/nginx restart 命令重启nginx 开机自动启动nginx, 如果需要开机启动服务,保存好/etc/init.d/ngin...

  • [nginx] nginx php-fpm安装配置 日期:2014-12-08 12:12:45 点击:152 好评:0

    nginx本身不能处理PHP,它只是个web服务器,当接收到请求后,如果是php请求,则发给php解释器处理,并把结果返回给客户端。 nginx一般是把请求发fastcgi管理进程处理,fascgi管理进程选择cgi子进程处理结果并返回被nginx 本文以php-fpm为例介绍如何使nginx支...

  • [nginx] nginx rewrite 指令 日期:2014-12-08 12:12:08 点击:55 好评:0

    nginx通过ngx_http_rewrite_module模块支持url重写、支持if条件判断,但不支持else。 该模块需要PCRE支持,应在编译nginx时指定PCRE源码目录,nginx安装方法。 nginx rewrite指令执行顺序: 1.执行server块的rewrite指令(这里的块指的是server关键字后{}包围...

  • [nginx] nginx关闭favicon.ico 日志记录 禁止访问隐藏文件 日期:2014-12-08 12:11:17 点击:60 好评:0

    # 把以下配置放到 server {} 块. #关闭favicon.ico不存在时记录日志 location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } # 不允许访问隐藏文件例如 .htaccess, .ht...

  • [nginx] nginx日志切割 日期:2014-12-08 12:10:55 点击:161 好评:0

    nginx的日志文件没有rotate功能。如果你不处理,日志文件将变得越来越大,还好我们可以写一个nginx日志切割脚本来自动切割日志文件。 第一步就是重命名日志文件,不用担心重命名后nginx找不到日志文件而丢失日志。在你未重新打开原名字的日志文件前,nginx还...

  • [nginx] nginx内置预定义变量 日期:2014-12-08 12:10:27 点击:196 好评:0

    nginx的配置文件中可以使用的内置变量以美元符$开始,也有人叫全局变量。其中,部分预定义的变量的值是可以改变的。 $arg_PARAMETER 这个变量值为:GET请求中变量名PARAMETER参数的值。 $args这个变量等于GET请求中的参数。例如,foo=123bar=blahblah;这个变...

  • [nginx] nginx中的try_files指令解释 日期:2014-12-08 12:09:49 点击:135 好评:0

    try_files 指令的官方介绍比较让人摸不着头脑,经网上一番总结查看,try_files最核心的功能是可以替代rewrite。 try_files 语法: try_files file ... uri 或 try_files file ... = code 默认值: 无 作用域: server location Checks for the existence of fil...

  • [nginx] nginx配置cakephp实现伪静态 日期:2014-12-08 12:08:27 点击:176 好评:0

    server { listen 80 ; server_name www . it.net.cn ; rewrite ^(.*) http : //it.net.cn$1 permanent; } server { listen 80 ; server_name it.net.cn ; # root directive should be global root / var / www / it.net.cn / public / app / webroot /; acce...

  • [nginx] nginx下wordpress rewrite 实现伪静态 日期:2014-12-08 12:07:56 点击:182 好评:0

    wordpress 自带的重写规则都是关于apache的,本文将介绍如何配制nginx下的wordpress重写规则。 首先,配置一个php的upstream,这样可以方便backend的机器和端口的改变,然后配置对应博客域名虚拟机。 # Upstream to abstract backend connection(s) for phpu...

  • 首页
  • 上一页
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 下一页
  • 末页
  • 5405398
栏目列表
推荐内容