网站无法提供服务(NGINX、Ubuntu)

网站无法提供服务(NGINX、Ubuntu)

这是我的 nginx.conf 文件

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
    worker_connections 4096;
    # multi_accept on;
}


http {

    server {
        listen 80;
        listen [::]:80;

        root /var/www/matsci.io/html;
        index index.html index.htm;

        server_name matsci.io www.matsci.io;

        location / {
            try_files $uri $uri/ =404;
        }
    }

}

我在 Google 域的 DNS 设置中激活了自定义名称服务器,并设置了网络记录。(见图片链接)

1

我有一个示例 html 文件 ( index.html),在编译时显示“标题” /var/www/example.com/html/index.html

我使用本指南设置了防火墙 ssh 等:https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04

我错过了什么?

答案1

您的域名当前没有配置任何 A/AAAA 记录。

按照Digital Ocean DNS 教程@,您将需要使用 hostname和 hostname为您的域创建 A/AAAA 记录www

相关内容