Ubuntu服务器(apache)赢得';不响应外部请求

Ubuntu服务器(apache)赢得';不响应外部请求,apache,ubuntu,ssh,server,Apache,Ubuntu,Ssh,Server,我是个新手,所以我可能会错过一些非常明显的东西,但我无法使用外部IP连接到我的服务器。在内部,一切都像梦一样工作(10.0.0.28/redmine),但当我尝试使用外部IP连接时,请求超时。我转发了ssh端口和端口80,如下所示,但这并没有解决问题。 我的端口现在在www.portchecktool.com上显示为打开状态 SSH在内部工作正常,但当我发出此处显示的命令时,它表示远程主机关闭了连接 ssh {my external ip} -pxxxx -i /home/millerir/.s

我是个新手,所以我可能会错过一些非常明显的东西,但我无法使用外部IP连接到我的服务器。在内部,一切都像梦一样工作(10.0.0.28/redmine),但当我尝试使用外部IP连接时,请求超时。我转发了ssh端口和端口80,如下所示,但这并没有解决问题。 我的端口现在在www.portchecktool.com上显示为打开状态

SSH在内部工作正常,但当我发出此处显示的命令时,它表示远程主机关闭了连接

ssh {my external ip} -pxxxx -i /home/millerir/.ssh/id_rsa -l imiller
类似地,当我导航到{my ip}/redmine或{my ip}或{my_ip}:80或我的ddns服务地址时,我会在尝试从浏览器连接错误时重置连接

我确实检查了服务器是否正在监听端口80和我的ssh端口,如下所示

me@ubuntu-server:/etc/apache2/sites-available$ sudo netstat -tulpn | grep LISTEN
tcp        0      0 0.0.0.0:xxxx            0.0.0.0:*               LISTEN      779/sshd
tcp        0      0 127.0.0.1:57384         0.0.0.0:*               LISTEN      1192/redmine
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      862/mysqld
tcp6       0      0 :::xxxx                 :::*                    LISTEN      779/sshd
tcp6       0      0 :::80                   :::*                    LISTEN      923/apache2
如果有人能帮助我,我将不胜感激。我被卡住了,有点不知所措

redmine.conf

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        #DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf

        DocumentRoot /var/www
        <Directory /var/www/redmine>
                RailsBaseURI /redmine
                PassengerResolveSymLinksInDocumentRoot on
        </Directory> 
 </VirtualHost>
<Listen 80

<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

#ServerName指令设置请求方案、主机名和端口
#服务器使用来标识自身。这在创建时使用
#重定向URL。在虚拟主机的上下文中,服务器名
#指定必须在请求的主机:标头中显示的主机名
#匹配此虚拟主机。对于默认虚拟主机(此文件),此
#该值不是决定性的,因为它被用作最后的宿主。
#但是,必须为任何其他虚拟主机显式设置它。
#服务器名www.example.com
服务器管理员webmaster@localhost
#DocumentRoot/var/www/html
#可用日志级别:trace8、…、trace1、调试、信息、通知、警告、,
#错误、暴击、警报、紧急情况。
#还可以为特定应用程序配置日志级别
#模块,例如。
#日志级别信息ssl:警告
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
#对于conf/available/中的大多数配置文件
#在全局级别启用或禁用,可以
#仅包含一个特定虚拟主机的行。例如
#以下行仅为此主机启用CGI配置
#在使用“A2F”全局禁用后。
#包括conf available/service-cgi-bin.conf
DocumentRoot/var/www
RailsBaseURI/redmine
PassengerResolveSymLinksInDocumentRoot打开
http.conf

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        #DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf

        DocumentRoot /var/www
        <Directory /var/www/redmine>
                RailsBaseURI /redmine
                PassengerResolveSymLinksInDocumentRoot on
        </Directory> 
 </VirtualHost>
<Listen 80

<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

所以我在仔细研究后发现,有些路由器不喜欢你“进进出出”。我尝试使用手机上的数据连接到我的服务器,现在可以正常工作。

显然我还没有足够的声誉来发布图片:(但我已尽力包含文本或我的端口转发设置。服务名称类型开始端口结束端口服务器IPv4服务器IPv6活动Web服务器TCP/UDP 80 80 10.0.0.28服务器SSH TCP/UDP xx xx 10.0.0.28