VPS侦探论坛

标题: 只能访问探针 nginx重启和日志报错 有大佬知道怎么改吗 [打印本页]

作者: gudumibug    时间: 2020-1-30 02:10
标题: 只能访问探针 nginx重启和日志报错 有大佬知道怎么改吗
只能访问探针 nginx重启和日志报错 有大佬知道怎么改吗


nginx... nginx: [warn] conflicting server name "192.168.1.197" on 0.0.0.0:80, ignored

作者: txf861    时间: 2020-1-30 10:43
server name 那里你看下,是不是定义重复了
作者: licess    时间: 2020-1-30 10:53
nginx提示“nginx: [warn] conflicting server name "192.168.1.197" on 0.0.0.0:80, ignored”,说明你在多个虚拟主机里面设置了多个相同的192.168.1.197的server_name造成了冲突

不清楚你说的“只能访问探针”,需要具体描述问题

作者: gudumibug    时间: 2020-1-30 15:54
licess 发表于 2020-1-30 10:53
nginx提示“nginx: [warn] conflicting server name "192.168.1.197" on 0.0.0.0:80, ignored”,说明你在 ...

就是只能访问自带的php探针  我要在局域网内访问sever name 必须一样才能访问把
作者: gudumibug    时间: 2020-1-30 15:55
txf861 发表于 2020-1-30 10:43
server name 那里你看下,是不是定义重复了

我要在局域网内访问 这个必须一样吧
作者: gudumibug    时间: 2020-1-30 16:35
licess 发表于 2020-1-30 10:53
nginx提示“nginx: [warn] conflicting server name "192.168.1.197" on 0.0.0.0:80, ignored”,说明你在 ...

改sever name后不报错 但是不能访问网站 只能访问php探针
作者: licess    时间: 2020-1-30 19:07
gudumibug 发表于 2020-1-30 16:35
改sever name后不报错 但是不能访问网站 只能访问php探针

不清楚你居然配置文件和机器情况没法说

nginx虽然可以用ip作为server_name,但是server_name必须是唯一的,多个就会报前面的warning信息
用IP访问,只要有这个IP的server_name就肯定到这个server_name的虚拟主机上,访问到的时探针就说明你访问到了默认虚拟主机上,肯定也就是配置文件有问题
作者: gudumibug    时间: 2020-1-31 07:35
licess 发表于 2020-1-30 19:07
不清楚你居然配置文件和机器情况没法说

nginx虽然可以用ip作为server_name,但是server_name必须是唯一 ...

大佬需要我提供什么信息 用的armbian装的  原来好好的 出门貌似他自动更新还是怎么了 就不能用了 配置文件具体要看那个

作者: licess    时间: 2020-2-1 08:51
gudumibug 发表于 2020-1-31 07:35
大佬需要我提供什么信息 用的armbian装的  原来好好的 出门貌似他自动更新还是怎么了 就不能用了 配置文 ...

改动的哪个或添加的哪个就发哪个的
作者: gudumibug    时间: 2020-2-4 03:33
licess 发表于 2020-2-1 08:51
改动的哪个或添加的哪个就发哪个的

那个都没有改动
作者: gudumibug    时间: 2020-2-4 04:22
licess 发表于 2020-2-1 08:51
改动的哪个或添加的哪个就发哪个的

server
    {
        listen 82;
        #listen [::]:82;
        server_name 192.168.1.197;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/192.168.1.121;

        include rewrite/none.conf;
        #error_page   404   /404.html;

        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

        include enable-php-pathinfo.conf;

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

        location ~ .*\.(js|css)?$
        {
            expires      12h;
        }

        location ~ /.well-known {
            allow all;
        }

        location ~ /\.
        {
            deny all;
        }

        access_log  /home/wwwlogs/192.168.1.121.log;
    }

就是这样的

作者: licess    时间: 2020-2-4 19:06
gudumibug 发表于 2020-2-4 04:22
server
    {
        listen 82;

单纯这个配置文件上没错误




欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) Powered by Discuz! X3.4