一、虚拟主机概念 虚拟主机是在网络服务器上划分出一定的磁盘空间供用户放置站点、应用组件等,提供必要的站点功能、数据存放和传输功能。所谓虚拟主机,也叫网站空间, 就是把一台运行在互联网上的服务器划分成多个虚拟的服务器,每一个虚拟主机都具有独立的...
1.什么是跨域以及产生原因 跨域是指a页面想获取b页面资源,如果a、b页面的协议、域名、端口、子域名不同,或是a页面为ip地址,b页面为域名地址,所进行的访问行动都是跨域的,而浏览器为了安全问题一般都限制了跨域访问,也就是不允许跨域请求资源。 跨域情...
在安装完nginx后,重新启动需要kill -HUP nginx进程编号来进行重新加载,显然十分不方便。如果能像apache一样,直接通过脚本进行管理就方便多了。 nginx官方早就想好了,也提供了这个脚本,地址:http://wiki.nginx.org/RedHatNginxInitScript。这里将管理脚...
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...
安装 # 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...
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@...
修改配置文件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...
使用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...
使用场景 最近,报告查询系统负载均衡集群相关配置已经完成,两种实现方式分别是基于E...
当你执行 nginx -t 得时候,nginx会去测试你得配置文件得语法,并告诉你配置文件是否...
本文将介绍一些SSL安全性的配置,以此提升网站的安全等级。先给出本博客的SSL配置: s...
我已经谈过一些关于 Nginx 的常见问题,其中有一些是关于如何优化Nginx,很多Nginx新...
nginx_lua_module是由淘宝的工程师清无(王晓哲)和春来(章亦春)所开发的nginx第三...
用Nginx建站的同学,常会有限速需求。开发测试阶段在本地限速模拟公网的环境,方便调...