使用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...
# 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...
Netcraft 公司最近公布了他们检测SSL/TLS网站的研究,并指出只有仅仅5%的用户正确执行了HTTP严格传输安全HSTS。本文介绍nginx如何配置HSTS。 什么是HSTS HTTPS(SSL和TLS)确保用户和网站通讯过程中安全,使攻击者难于拦截、修改和假冒。当用户手动输入域名或h...
Nginx使用 ngx_headers_more 模块来增加、删除出站、入站的 Header 信息。 ngx_headers_more项目主页 默认该模块没有加入到 Nginx 的源码中,要想使用相关功能需要在编译 Nginx 时加入该模块。 本人服务器中的 Nginx 在编译时没有加入该模块,使用 -V 查看当...
安装说明 系统环境:CentOS6、CentOS7、Red Hat6、Red Hat7 软件:nginx-1.8.0.tar.gz 其他所需软件:openssl-1.0.2d.tar.gz、pcre-8.37.tar.gz、zlib-1.2.8.tar.gz 安装方式:源码编译安装 安装位置:/usr/local/nginx 下载地址:http://nginx.org/en/downl...
server { listen 80; server_name tool.lu; root /data/html/tool.lu/public; index index.html index.php; location / { try_files $uri $uri/ /index.php$is_args$query_string; } location ~ \.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000;...
配置文件改成这样 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 server { listen 80; server_name sub.domain.com; set $root_path /srv/www/default; root $root_path; index index.php index.html inde...
配置文件改成这样 server{ listen80; server_namesub.domain.com; set$root_path/srv/www/default; root$root_path; indexindex.phpindex.htmlindex.htm; try_files$uri$uri/@rewrite; location@rewrite{ rewrite^/(.*)$/index.php?_url=/$1; } location~\.p...
server { 02. 03. listen 80; 04. server_name sub.domain.com; 05. set $root_path /var/www/html/application_name/public; 06. root $root_path; 07. 08. index index.php index.html index.htm; 09. 10. try_files $uri $uri/ @rewrite; 11. 12. locatio...
环境: Linux ubuntu 3.2.0-23-generic-pae Ubuntu下安装nginx+php+FastCGI 1. 安装nginx 使用命令安装: #sudo apt-get install nginx Nginx的启动和停止: /etc/init.d/nginx start/stop/restart Service nginx start/stop 2. 修改nginx的配置 #vi /etc/ngin...