配置nginx配置,浏览器过滤

曹据
• 阅读 3089
server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;


        location /
        {
              root   D:/LAB/test;    
 
          if ( $http_user_agent ~* "MSIE [6-9].[0-9]")      #MSIE IE浏览器
               {
                  rewrite (.*) /err.html break;
              }
              if ($http_user_agent ~* "Firefox")    #Firefox火狐浏览器
             {
                  rewrite (.*) /err.html break;
              } 
          
        }



        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

    }
点赞
收藏
评论区
推荐文章
芝士年糕 芝士年糕
2年前
nginx 启动、停止、关闭
使用3A服务器搭建的centos系统安装nginx教程在我的往期博客中1,nginx指定配置文件/usr/local/nginx/sbin/nginxc/usr/local/nginx/conf/nginx.conf1c参数指定了要加载的nginx配置文件路径1,从容停止Nginx:killQUIT主进程号2,快速停止Nginx:kil
Stella981 Stella981
3年前
SpringBoot学习:整合shiro自动登录功能(rememberMe记住我功能)
首先在shiro配置类中注入rememberMe管理器!复制代码(https://oscimg.oschina.net/oscnet/675f5689159acfa2c39c91f4df40a00ce0f.gif)/cookie对象;rememberMeCookie()方法是设置Cookie的生成模
Stella981 Stella981
3年前
Nginx配置https
一、开启nginx的ssl模块1.未安装过nginx,编译安装配置参数如下:./configure\prefix/usr/local/nginx\withpcre\withhttp\_ssl\_modulessl模块\withhttp\_stub\_status\_module\wit
Stella981 Stella981
3年前
Nginx 反向代理Springboot oAuth https配置方案
Nginx配置方案server{listen80;server_namewww.yourname.com;rewrite^(.)$https://${server_name}$1permanent;}server{
Stella981 Stella981
3年前
Nginx提供下载apk服务
有时候我们可能需要提供文件或者其他apk下载链接,通过nginx配置可以很简单地实现。server{  listen80;  server_namedownload.xxx.com;  rootapp;  location/{    indexi
Wesley13 Wesley13
3年前
4. Nginx模块
Nginx官方模块1.ngx\_http\_stub\_status\_modulehttp://nginx.org/en/docs/http/ngx\_http\_stub\_status\_module.html。(https://www.oschina.net/action/GoToLink?urlhttp%3A%2
Stella981 Stella981
3年前
Nginx报错:Sorry, the page you are looking for is currently unavailable. Please try again later.
查看了进程,nginx,phpfpm都在运行,排除程序错误,那么就是配置的问题了.一个可能的错误,是由于配置中的 fastcgi\_pass配置错了错误的配置如下 server{listen80;server_namelocalhost;
Easter79 Easter79
3年前
SpringBoot学习:整合shiro自动登录功能(rememberMe记住我功能)
首先在shiro配置类中注入rememberMe管理器!复制代码(https://oscimg.oschina.net/oscnet/675f5689159acfa2c39c91f4df40a00ce0f.gif)/cookie对象;rememberMeCookie()方法是设置Cookie的生成模
Stella981 Stella981
3年前
Nginx路由重写
server{listen80;server_name_;access_log/data/wwwlogs/access_nginx.logcombined;root/data/wwwroot/default;indexindex.htmlinde
Stella981 Stella981
3年前
Logstash收集nginx访问日志和错误日志
1、收集访问日志1)、首先是要在nginx里面配置日志格式化输出log_formatmain"$http_x_forwarded_for|$time_local|$request|$status|$body_bytes_sent|$request_body|$content_length|$http_ref
美凌格栋栋酱 美凌格栋栋酱
5个月前
Oracle 分组与拼接字符串同时使用
SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(