我如何允许局域网的 PC 访问我的 NGINX 服务器

问题描述

我已经使用 localbyflywheel 在 Nginx 服务器上安装了 wordpress 并且它工作正常,我的问题我想从其他计算机打开 LAN 访问,但我不知道从哪里开始,我一直在查看一些教程提到服务器块文件中的配置,我已经尝试过,但没有任何效果。 PS,当我尝试 ngrock 时,它可以在互联网上完美运行,但由于我的互联网上传带宽很小,所以速度很慢。

error_log "{{logs.errorLog}}";

events {
    worker_connections  1024;
}

http {
    include includes/mime-types.conf;

    server_names_hash_bucket_size 128;

    client_max_body_size 1000M;
    default_type       application/octet-stream;
    access_log         off;
    sendfile           off;
    keepalive_timeout  3;

    fastcgi_buffers 32 32k;
    fastcgi_buffer_size 32k;
    fastcgi_read_timeout 1800s;

    map $http_x_forwarded_proto $resolved_scheme {
        default "http";
        "https" "https";
    }

    map $resolved_scheme $fastcgi_https {
        default '';
        https on;
    }

    include site.conf;
}

那是我的 Nginx conf 文件 这是我的站点配置文件

 upstream PHP {
  {{#each fastcgi_servers}}
  server {{this}};
  {{/each}}
}

server {
    listen {{port}};
    root   "{{root}}";

    index index.PHP index.html index.htm;

    #
    # Generic restrictions for things like PHP files in uploads
    #
    include includes/restrictions.conf;

    #
    # Gzip rules
    #
    include includes/gzip.conf;

    #
    # wordpress Rules
    #
    {{#unless site.multiSite}}
    include includes/wordpress-single.conf;
    {{else}}
    include includes/wordpress-multi.conf;
    {{/unless}}

我还没有上传所有文件,但如果需要我会上传。 预先感谢您的帮助

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)