开发者社区> 问答> 正文

主机宝linux怎么取消ip访问默认页面

主机宝linux怎么取消ip访问默认页面

展开
收起
小常 2014-12-25 22:00:02 10475 0
2 条回答
写回答
取消 提交回答
  • server {
                listen       80 default;
                server_name  "";

                root /a/apps/zhujibao/manager/linuxdef;
                    index index.html index.htm index.shtml index.php;

                    location ~ \.php$ {
                            fastcgi_pass   unix:/dev/shm/php.sock;
                            include        fastcgi_params;
                            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                    }    
            }  


    可以改为:

    server {
                listen       80 default;
                server_name  "";

                 return 404;

                root /a/apps/zhujibao/manager/linuxdef;
                    index index.html index.htm index.shtml index.php;

                    location ~ \.php$ {
                            fastcgi_pass   unix:/dev/shm/php.sock;
                            include        fastcgi_params;
                            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                    }    
            }  
    2015-01-27 17:19:33
    赞同 展开评论 打赏
  • 回1楼lisoome的帖子
    怎么我删除了还是不行
    2015-01-13 15:13:10
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载