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

上一篇 / 下一篇  2020-07-14 16:08:43 / 个人分类:nginx

#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:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar