该组件可以为我们的http请求设置默认的值。假如,我们创建一个测试计划有很多个请求且都是发送到相同的server,这时我们只需添加一个 Http request defaults组件并设置“Server Name or IP”,然后添加多个http请求且不设置"server name or ip", ...
分类:
Web程序 时间:
2017-04-11 16:34:38
阅读次数:
232
将 xxx.com 重定向到 www.xxx.com打开 /usr/local/nginx/conf/vhost/你网站的域名.com.conf 2.查看原有的 server{}中的 server_name 已经是否包含两种域名 如果有,先删除 xxx.com,然后在文件的末端添加 保存退出,然后重 ...
分类:
其他好文 时间:
2017-04-07 13:36:54
阅读次数:
194
server { listen 80 default_server; #listen [::]:80 default_server ipv6only=on; server_name blog.yangguangwei.xyz; index index.php index.html index.htm ...
分类:
其他好文 时间:
2017-04-06 13:21:48
阅读次数:
223
环境:centos7配置repo文件[root@localhostyum.repos.d]#catbase.repo[server]name=serverbaseurl=file:///openyum/gpgcheck=0将本地yum包放到要创建的本地yum源的路径中tarzxfopenstack.tar.gz-C/openyum/1/tarzxfcinder.tar.gz-C/openyum/2/安装createrepoyum-yinstallcreater..
分类:
其他好文 时间:
2017-04-06 01:44:21
阅读次数:
114
upstream yg{ server 127.0.0.x; } server { listen 80; server_name www.hikaru.pw; location / { rewrite ^/(.*)$ /yg/$1 last; } location ~* ^/yg/.*$ ... ...
分类:
其他好文 时间:
2017-04-01 19:03:07
阅读次数:
187
配置步骤: 1.在conf中新建server(复制粘贴),更改server的server_name(自己的服务名,可任意取)和location(项目所在位置) 对conf文件的处理(注意root 后的地址中的斜杠只能是右斜杠) 2.找到hosts文件,在最后一行加入“127.0.0.1 static ...
分类:
其他好文 时间:
2017-03-18 21:07:41
阅读次数:
133
配置说明:listen 80; =>指定虚拟主机监听的是80端口server_name localhost; =>指定虚拟主机域名location / { ... } =>匹配请求路径,/表示匹配所有请求root html; =>指定虚拟主机的物理根目录,eg、html物理根目录位于D:\div\n ...
分类:
其他好文 时间:
2017-03-12 00:55:58
阅读次数:
142
通过 301重定向可以实现 把www.baidu.com和baidu.com合并,并把之前的域名也一并合并。 有两种实现方法: 第一种方法是判断nginx核心变量host(别名功能): server { server_name www.baidu.com baidu.com ; if ($host ...
分类:
Web程序 时间:
2017-03-09 16:56:24
阅读次数:
247
首先root块:nginx的配置文件如下:[root@localhostwww]#cat/etc/nginx/conf.d/admin.conf
server
{
listen80;
server_name_;
indexindex.htmlindex.php;
location/admin/{
root/data/www/;
auth_basic"admincom";
auth_basic_user_file/etc/nginx/passwd;
}
}root路径文件存放..
分类:
其他好文 时间:
2017-03-03 19:30:13
阅读次数:
157
server { listen 80; server_name all.bjed.com; root "F:\www\asdata"; location / { index index.html index.htm index.php; #autoindex on; if (!-e $request ...
分类:
Web程序 时间:
2017-03-01 16:55:58
阅读次数:
371