nginx通过ip访问自动跳转到域名

admin 2022年9月26日11:00:28系统文档评论2,545 次浏览阅读模式

上一篇 /
下一篇  2020-07-14 16:08:43

/ 个人分类:nginx

查看( 4854 ) /
评论( 0 ) /
评分( 0 / 0 )

#user  nobody;

worker_processes  1;

events {

    worker_connections  1024;

}

http {

    include       mime.types;

    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;

        listen       8057;

        server_name  isxkyxxinfo.3322.org;

 location / {

            root   /opt/zhicheng/isky-common-web/common;

            index  index.html index.htm;

            try_files $uri $uri/ /index.html;

}

if ($host = '10.204.125.234'){

   return 301 http://isxkyxxinfo.3322.org:8057;

}

收藏

举报

TAG:

相关文章
weinxin
我的微信
微信扫一扫
admin
  • 本文由 发表于 2022年9月26日11:00:28
  • 转载请务必保留本文链接:https://anyun.org/a/jishuguanzhu/xitongwendang/2022/0926/11944.html