
nginx
yongzhang52545
这个作者很懒,什么都没留下…
展开
-
Nginx 启动脚本/重启脚本
第一步先运行命令关闭nginxsudo kill `cat /usr/local/nginx/logs/nginx.pid`第二步vi /etc/init.d/nginx输入以下内容#!/bin/sh## nginx - this script starts and stops the nginx daemin## chkconfig: -转载 2012-05-31 11:49:17 · 8344 阅读 · 0 评论 -
nginx设置目录文档访问权限
在nginx的服务器配置文件中加入auth_basic,auth_basic_user_file两行代码:location ~ / { allow 127.0.0.0/8 allow 61.134.1.4; deny all; auth_basic "Authorization Required"; auth_basic_user_file /pat原创 2016-04-29 16:43:21 · 1608 阅读 · 0 评论 -
利用不同端口为本地nginx服务器配置多个站点
首先找到nginx的配置文件nginx.conf[root@localhost nginx]# vi nginx.conf打开配置文件后找到类似下面一段:include /etc/nginx/conf.d/*.conf;没有的就加上,这是我的路径,你们的看实际情况改改,确保路径存在加入这段的意思实际是把conf.d目录的以.conf结尾的配置文件都加载进来,修改后保存nginx原创 2016-04-29 17:03:17 · 26271 阅读 · 3 评论