知识点022-nginx 的rewrite 伪静态与设置网页登陆密码
2018-02-26 00:00
423 查看
1.rewrite的书写
直接跳转到51.cto网页上面去
2.访问认证
server { listen 80; server_name www.jimmy.com; location / { root html/www; index index.html index.htm; } location =/ { rewrite ^/(.*) http://home.51cto.com/$1 permanent; } access_log logs/www_access.log main; }
直接跳转到51.cto网页上面去
2.访问认证
获取htpasswd设置账号密码命令 yum install httpd -y which htpaaswd [root@web01 ~]# which htpasswd /usr/bin/htpasswd [root@web01 ~]# 创建账号密码 htpasswd -bc /application/nginx/conf/htpasswd carlton 123456 [root@web01 ~]# htpasswd -bc /application/nginx/conf/htpasswd carlton 123456 Adding password for user jimmy [root@web01 ~]# 在www.conf配置文件中添加语句 auth_basic "This is carlton webhome"; auth_basic_user_file /application/nginx/conf/htpasswd;
相关文章推荐
- centos7 vsftpd网页登陆身份验证设置(需输入用户名密码)
- linux下设置ssh免密码登陆的配置步骤分享
- ssh 非交互免输入密码自动登陆设置
- Exchange web 支持第一次登陆和过期用户更改密码设置
- Win10系统如何设置图片密码滑动手势登陆
- 网站二级目录或者子目录安装 WordPress 伪静态规则设置方法,服务器为nginx
- Nginx常用Rewrite伪静态法则,其中有discuz,ecshop等多个产品
- ssh免密码登陆设置时Authentication refused: bad ownership or modes错误解决方法
- 怎样取消与设置windows 2003 登陆密码 iis安装
- 【Redis使用系列】redis设置登陆密码
- hadoop启动集群的免密码登陆设置
- Tomcat详解:实现SSL配置,日志配置,登陆用户名与密码设置,路径列表
- 在DOS下设置系统登陆密码
- Nginx对于图片,js等静态文件的缓存设置
- C#中如何在登录案例中设置用户输错三次密码禁止登陆,15分钟后才能继续。
- hadoop环境搭建准备工作之二:linux下设置ssh无密码登陆
- nginx的简单rewrite规则和开启密码认证功能
- [nginx]proxy_pass&rewrite知识点
- nginx下laravel框架rewrite的设置
- Nginx常用Rewrite(伪静态规则)