站点无法访问 + URL 检查:超时

站点无法访问 + URL 检查:超时

在 PC 上安装软件期间,我遇到了 Ubuntu 18.04.4 桌面版中的 grub 系统问题,我通过从安装 iso 映像中复制 /bin/bash 文件夹解决了该问题:缺少操作系统。错误:未知文件系统 grub rescue

但令我惊讶的是,现在我无法再看到我的网页了,尽管表面上一切正常。”无法访问此网站https://ggc.world/无法访问。ERR_ADDRESS_UNREACHABLE”: 在此处输入图片描述

这是通过 digicert 和 check-your-website-server 的检查来标记的: 在此处输入图片描述

在此处输入图片描述

但显然一切正常:

(base) marco@pc01:~/webMatters/vueMatters/testproject$ npm run serve

> [email protected] serve /home/marco/webMatters/vueMatters/testproject
> vue-cli-service serve

 INFO  Starting development server...
98% after emitting CopyPlugin

 DONE  Compiled successfully in 906ms                                 9:36:31 AM

  App running at:
  - Local:   http://localhost:8080 
  - Network: http://ggc.world/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

nginx.conf:

(base) marco@pc01:~$ sudo nano /etc/nginx/nginx.conf 
[sudo] password for marco: 

user www-data;
worker_processes auto;
pid /run/nginx.pid;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        # Basic Settings

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        # SSL Settings

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
        ssl_prefer_server_ciphers on;
        # Logging Settings
        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
        gzip on;

        include /etc/nginx/conf.d/*.conf;
}

sudo nano /etc/nginx/conf.d/default.conf:

server {
    listen 443 ssl http2 default_server;
    server_name ggc.world;

    ssl_certificate /etc/letsencrypt/live/ggc.world/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/ggc.world/privkey.pem; # managed by Certbot

    ssl_trusted_certificate /etc/letsencrypt/live/ggc.world/chain.pem;

    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    ssl_session_timeout 5m;
    #ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-
     draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:50m;
    #ssl_stapling on;
    #ssl_stapling_verify on;

    access_log /var/log/nginx/ggcworld-access.log combined;

    add_header Strict-Transport-Security "max-age=31536000";
   location = /favicon.ico { access_log off; log_not_found off; }

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        #proxy_set_header Host $host;
    }
}

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    error_page 497 https://$host:$server_port$request_uri;
    server_name www.ggc.world;
    return 301 https://$server_name$request_uri;

    access_log /var/log/nginx/ggcworld-access.log combined;

    add_header Strict-Transport-Security "max-age=31536000";
    location = /favicon.ico { access_log off; log_not_found off; }

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        #proxy_set_header Host $host;
    }
}

upstream websocket {
    ip_hash;
    server localhost:3000;
}

server {
    listen 81;
    server_name ggc.world www.ggc.world;

    #location / {
    location ~ ^/(websocket|websocket\/socket-io) {
        proxy_pass http://127.0.0.1:4201;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-Forwared-For $remote_addr;
        proxy_set_header Host $host;

        proxy_redirect off;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

(base) marco@pc01:~$ sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2020-02-17 07:52:51 CET; 1h 58min ago
     Docs: man:nginx(8)
  Process: 8830 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload   
(code=exited, status=0/SUCCESS)
  Process: 1090 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, 
status=0/SUCCESS)
  Process: 1067 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, 
status=0/SUCCESS)
 Main PID: 1092 (nginx)
    Tasks: 9 (limit: 4915)
   CGroup: /system.slice/nginx.service
           ├─1092 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
           ├─8831 nginx: worker process
           ├─8832 nginx: worker process
           ├─8833 nginx: worker process
           ├─8835 nginx: worker process
           ├─8836 nginx: worker process
           ├─8837 nginx: worker process
           ├─8838 nginx: worker process
           └─8840 nginx: worker process

feb 17 07:52:51 pc01 systemd[1]: Starting A high performance web 
server and a reverse proxy 
server...
feb 17 07:52:51 pc01 systemd[1]: Started A high performance web server
and a reverse proxy server.
feb 17 09:51:29 pc01 systemd[1]: Reloading A high performance web 
server and a reverse proxy server.
feb 17 09:51:29 pc01 systemd[1]: Reloaded A high performance web 
server and a reverse proxy server.
(base) marco@pc01:~$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

在尝试访问该网站之前,我清理了网络浏览器的缓存和历史记录的所有内容。安装的唯一 Google Chrome 扩展程序是 Vue.js devtools

DNS 提供商配置与 Internet 服务提供商配置相匹配:

在此处输入图片描述

在此处输入图片描述 互联网连接正常。

(base) marco@pc01:~$ ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:6b:e8:56:f7  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.2  netmask 255.255.255.0  broadcast  
192.168.1.255
        inet6 fe80::1c93:b964:d865:b7a9  prefixlen 64  scopeid 
0x20<link>
        ether 78:24:af:43:ef:5c  txqueuelen 1000  (Ethernet)
        RX packets 207125  bytes 213694492 (213.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 140025  bytes 24413432 (24.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 110884  bytes 15179613 (15.1 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 110884  bytes 15179613 (15.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp5s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether c0:4a:00:09:0e:80  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

(base) marco@pc01:~$ sudo ifconfig -s
Iface      MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP 
TX-OVR Flg
docker0   1500        0      0      0 0             0      0      0   
  0 BMU
enp3s0    1500   212039      0      0 0        144614      0      0  
  0 BMRU
lo       65536   115901      0      0 0        115901      0      0  
  0 LRU
wlp5s0    1500        0      0      0 0             0      0      0 
  0 BMU


(base) marco@pc01:~$ systemd-resolve --status
Global
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa
                      29.172.in-addr.arpa
                      30.172.in-addr.arpa
                      31.172.in-addr.arpa
                      corp
                      d.f.ip6.arpa
                      home
                      internal
                      intranet
                      lan
                      local
                      private
                      test

Link 4 (docker0)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 3 (wlp5s0)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 2 (enp3s0)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
     DNSSEC setting: no
   DNSSEC supported: no
         DNS Servers: 192.168.1.1
          DNS Domain: ~.
                      station

我需要检查和验证哪些方面、元素、配置?我该如何解决这个问题?期待您的帮助。Marco

答案1

重大更新:已解决(但仍然不知道原因)...

我修复了 PC 的 IP 地址,一切正常......但我实际上不明白为什么一切都正常,如果在软件安装出现问题之前,本地 IP 地址是动态的并且已经运行良好。

相关内容