Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux CentOS/Nginx服务器不兼容';t工作,托管节点应用程序_Linux_Apache_Nginx_Centos_Vps - Fatal编程技术网

Linux CentOS/Nginx服务器不兼容';t工作,托管节点应用程序

Linux CentOS/Nginx服务器不兼容';t工作,托管节点应用程序,linux,apache,nginx,centos,vps,Linux,Apache,Nginx,Centos,Vps,我有一个非常简单的服务器设置,由于某些原因无法正常工作 我有两个应用程序在本地运行,一个在端口1999上,另一个在端口8000上 我已禁用Apache,并安装了nginx。这是我在/etc/nginx/中的nginx.conf: user nginx; worker_processes 8; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_conne

我有一个非常简单的服务器设置,由于某些原因无法正常工作

我有两个应用程序在本地运行,一个在端口
1999
上,另一个在端口
8000

我已禁用Apache,并安装了
nginx
。这是我在
/etc/nginx/
中的
nginx.conf

user  nginx;
worker_processes  8;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


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

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    gzip  on;
    server_names_hash_bucket_size 64;

    include /etc/nginx/conf.d/*.conf;
}
这是我在
/etc/nginx/conf.d/
中的
default.conf

server {
    listen 80;

    server_name attendahh.com;

    location / {
        proxy_pass http://localhost:1999;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

server {
    listen 80;

    server_name threadfinder.net;

    location / {
        proxy_pass http://localhost:8000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}
导航到
http://my-ip-address:1999
http://my-ip-address:8000
工作正常,但访问我的域却不行

我觉得NGINX不能正常工作,可能主机文件中有什么东西/其他东西把事情搞砸了。我可以采取什么步骤来解决这个问题?这是新安装的
NGINX


编辑:另外,当我尝试访问
threadfinder.net
attendahh.com
时,我在
/var/log/nginx/access.log

上的访问日志中没有显示任何内容。那么,您的DNS有问题吗?

很可能,现在看看。命名服务器似乎设置正确,做
dig@23.226.227.16 attendahh.com
工作(据我所知?)。我能做进一步的测试看看有什么问题吗?