• centos/rhel下实现nginx自启动脚本实例

    日期:

    1. 建立脚本文件nginxd [root@it.net.cn]# vi /etc/init.d/nginxd 插入以下内容 #!/bin/bash## chkconfig: - 85 15# description: Nginx is a World Wide Web server.# processname: nginxnginx=/usr/local/nginx/sbin/nginxconf=/usr/local/nginx/conf/ngin...

  • git服务器gitlab之搭建和使用

    日期:

    git服务器比较有名的是gitosis和gitolite,这两个管理和使用起来稍微有些复杂,没有web页面,而gitlab则是类似于github的一个工具,github无法免费建立私有仓库,并且为了代码安全,于是在内网安装了一个自己实验室的一个git服务器,多方比较,选择了gitlab...

  • gitlab 6 安装备忘录

    日期:

    gitlab 6.2-stable;Ubuntu 13.10;ruby 2.0.0 推荐使用PostgreSQL,MySQL不同版本可能碰到兼容性问题(www.oschina.net/question/82993_84763) ruby安装推荐使用rvm(ruby-china.org/wiki/install_ruby_guide) 参考:www.sagestroll.com/node/202 gem,ruby,bundle...

  • Nginx基本安装配置

    日期:

    安装 # yum install pcre* -y # tar xf nginx-1.2.1.tar.gz # cd nginx-1.2.1 # ./configure --with-http_stub_status_module --prefix=/usr/local/nginx --with-http_gzip_static_module # make make install [root@server ~]# cd /usr/local/nginx/ [root@s...

  • Nginx配置之基于域名的虚拟主机

    日期:

    1、配置好DNS解析 [root@server ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.2 (Santiago) [root@server ~]# uname -r 2.6.32-220.el6.i686 [root@server ~]# yum install bind* -y [root@server ~]# vim /etc/named.conf [root@...

  • nginx获取自定义header参数

    日期:

    修改配置文件fastcgi.conf,加上以下内容 fastcgi_param HTTP_USERNAME $http_username; 修改nginx.conf,日志输出格式,添加$http_username log_format main $remote_addr - $remote_user [$time_local] $request $status $body_bytes_sent $http_referer $htt...

  • Nginx服务器中使用lua获取get或post参数

    日期:

    使用ngx_lua模块(http://wiki.nginx.org/HttpLuaModule): local request_method = ngx.var.request_method local args = nil local param = nil local param2 = nil --获取参数的值 if GET == request_method then args = ngx.req.get_uri_args() elseif POS...

  • 获取安装后Apache、MySQL、Nginx、PHP编译时参数

    日期:

    # cat /usr/local/apache2/build/config.nice //获取Apache编译时的参数 #!/bin/sh # #Created by configure ./configure\ --enable-modules=all\ --enable-mods-shared=all\ --enable-charset-lite\ --enable-unique-id\ --enable-usertrack\ --disable-ver...

  • HTTP HSTS协议和 nginx

    日期:

    Netcraft 公司最近公布了他们检测SSL/TLS网站的研究,并指出只有仅仅5%的用户正确执行了HTTP严格传输安全HSTS。本文介绍nginx如何配置HSTS。 什么是HSTS HTTPS(SSL和TLS)确保用户和网站通讯过程中安全,使攻击者难于拦截、修改和假冒。当用户手动输入域名或h...

  • Nginx设置Header头信息

    日期:

    Nginx使用 ngx_headers_more 模块来增加、删除出站、入站的 Header 信息。 ngx_headers_more项目主页 默认该模块没有加入到 Nginx 的源码中,要想使用相关功能需要在编译 Nginx 时加入该模块。 本人服务器中的 Nginx 在编译时没有加入该模块,使用 -V 查看当...