Codis FE管理界面验证配置
2016-06-17 18:08
190 查看
软件版本:
CentOS-7.1.1511
pcre-8.37.tar.gz
nginx-1.8.0.tar.gz
1. 安装所需的依赖包
yum install -y gcc make gcc-c++ automake lrzsz openssl-devel zlib-* bzip2-* readline* zlib-* bzip2-* git
2. 编译安装nginx
tar zxvf pcre-8.37.tar.gz
cd pcre-8.37
./configure
make && make install
tar zxvf nginx-1.8.0.tar.gz
cd nginx-1.8.0
#./configure --prefix=/usr/local/nginx
./configure --prefix=/apps/svr/nginx
make && make install
cd /apps/svr
chown -R apps:apps nginx
3. 在线生成用户名和密码加密文件并写到指定文件中
http://tool.oschina.net/htpasswd
\\将生成的结果复制到文件中。
vim /apps/svr/nginx/conf/pass
cods_fe:$apr1$SSZq7WR.$QAPZd6dNYKtPtHigg7Yzm1
4. 配置反向代理,启用验证功能
vim /apps/svr/nginx/conf/nginx.conf
user nobody;
worker_processes 2;
error_log logs/error.log notice;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
upstream dashboard {
server 192.168.24.103:8080;
}
server {
listen 80;
server_name 192.168.24.103;
location / {
auth_basic "Welcome to visit Codis dashboard.";
auth_basic_user_file /apps/svr/nginx/conf;
proxy_pass http://10.16.30.103:8080/;
}
access_log logs/codis_dashboard.log main;
}
}
5. 启动nginx 服务
sudo /apps/svr/nginx/sbin/nginx
停止nginx
sudo /apps/svr/nginx/sbin/nginx -s stop
重新加载
sudo /apps/svr/nginx/sbin/nginx -s reload
6. 访问进行测试验证
http://192.168.24.103
CentOS-7.1.1511
pcre-8.37.tar.gz
nginx-1.8.0.tar.gz
1. 安装所需的依赖包
yum install -y gcc make gcc-c++ automake lrzsz openssl-devel zlib-* bzip2-* readline* zlib-* bzip2-* git
2. 编译安装nginx
tar zxvf pcre-8.37.tar.gz
cd pcre-8.37
./configure
make && make install
tar zxvf nginx-1.8.0.tar.gz
cd nginx-1.8.0
#./configure --prefix=/usr/local/nginx
./configure --prefix=/apps/svr/nginx
make && make install
cd /apps/svr
chown -R apps:apps nginx
3. 在线生成用户名和密码加密文件并写到指定文件中
http://tool.oschina.net/htpasswd
\\将生成的结果复制到文件中。
vim /apps/svr/nginx/conf/pass
cods_fe:$apr1$SSZq7WR.$QAPZd6dNYKtPtHigg7Yzm1
4. 配置反向代理,启用验证功能
vim /apps/svr/nginx/conf/nginx.conf
user nobody;
worker_processes 2;
error_log logs/error.log notice;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
upstream dashboard {
server 192.168.24.103:8080;
}
server {
listen 80;
server_name 192.168.24.103;
location / {
auth_basic "Welcome to visit Codis dashboard.";
auth_basic_user_file /apps/svr/nginx/conf;
proxy_pass http://10.16.30.103:8080/;
}
access_log logs/codis_dashboard.log main;
}
}
5. 启动nginx 服务
sudo /apps/svr/nginx/sbin/nginx
停止nginx
sudo /apps/svr/nginx/sbin/nginx -s stop
重新加载
sudo /apps/svr/nginx/sbin/nginx -s reload
6. 访问进行测试验证
http://192.168.24.103
相关文章推荐
- JSP页面嵌套c:forEach
- js笔记--面向对象
- JavaScript案例学习2
- JavaScript案例学习1
- 使用Karma 来进行 JavaScript 测试
- jQuery-ui插件datepicker的参数使用详解
- Ionic Js二十:选项卡栏操作
- js选项卡的实现方法
- jQuery 插件autocomplete 应用
- Ionic Js十九:加载动画
- canvas 简易时钟
- 使用spring mvc+localResizeIMG实现HTML5端图片压缩上传
- ExtJs6 修改store里面数据grid单元格左上角会有红点标签的去掉方法
- jquery.validate.js的使用
- HTML(格式,文本标签)
- 在线制作h5
- Ionic Js十八:滑动框
- JavaScript
- html
- caffe softmax 层形状