首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在同一个端口nginx和digitalocean上运行的两个tpcs

在同一个端口nginx和digitalocean上运行的两个tpcs
EN

Stack Overflow用户
提问于 2020-10-12 19:37:32
回答 1查看 41关注 0票数 1

我正在数字海洋上部署我的react应用程序。我遵循了这个教程,一切都很顺利:https://www.youtube.com/watch?v=lN0oiYqenpA&ab_channel=RyanMichaelHirst

现在,每当我去我的ip或域名,我发现以下错误: 404找不到。

每当我运行nginx的日志时,它都会显示端口80正在被使用。因此,我运行以下代码:

sudo netstat -pan | grep ":80“

代码语言:javascript
复制
tcp        0      0 159.203.87.191:80       52.84.150.39:31164      SYN_RECV    -
tcp        0      0 159.203.87.191:80       52.84.150.39:38386      SYN_RECV    -

我知道这是一个内部错误,但我似乎找不到其中的错误。我有两个东西在同一个端口上运行,所有东西都崩溃了。它昨天开始工作了,我得到了nginx页面的欢迎。

这是我的服务器配置。(Nginx)

代码语言:javascript
复制
upstream my_nodejs_upstream {
        # (this is the server's ip address)
        server x.x.x.x.;
        keepalive 64;
}

server {
        listen 80;
        listen [::]:80 ipv6only=on;

        # SSL configuration
        #
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;
        #
        # Note: You should disable gzip for SSL traffic.
        # See: https://bugs.debian.org/773332
        #
        # Read up on ssl_ciphers to ensure a secure configuration.
        # See: https://bugs.debian.org/765782
        #
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        #
        # include snippets/snakeoil.conf;

        root /var/www/html;

        # Add index.php to the list if you are using PHP
        index index.html index.htm index.nginx-debian.html;     


server_name mmt-university;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_pass http://universitymmt.com/;
                proxy_set_header Host $http_host;
                proxy_set_header X-NginX-Proxy true;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_redirect off;
                proxy_read_timeout 240s;
        }

        # pass PHP scripts to FastCGI server
        #
        #location ~ \.php$ {
        #       include snippets/fastcgi-php.conf;
        #
        #       # With php-fpm (or other unix sockets):
        #       fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        #       # With php-cgi (or other tcp sockets):
        #       fastcgi_pass 127.0.0.1:9000;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #       deny all;
        #}
}
EN

回答 1

Stack Overflow用户

发布于 2020-10-12 19:58:13

连接处于SYN_RECV状态,因为内核收到了一个处于侦听模式的端口的SYN包,但另一端没有用确认应答。

通过在服务器上运行捕获,检查服务器是否收到ACK。捕获是在客户端还是在服务器上进行的?

此外,大量的SYN-RECV表示可能对主机实施了SYN Flood攻击。有关更多信息,请访问:https://www.cloudflare.com/learning/ddos/syn-flood-ddos-attack/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64317133

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档