ssl - 使用新加坡 IP 时无法通过 AWS 新加坡的 8443 端口访问 tomcat

标签 ssl amazon-web-services tomcat7

我关注 this在新加坡地区的 debian EC3 中使用 tomcat7 安装 Mifosx 的教程。

那我就关注this为我的服务器安装一个免费的 startSSL。

在越南对我来说一切都很好(已经尝试过更改 IP,更改 PC... 仍然可以)

但是其他国家(甚至我在新加坡的 friend 和一个Sing windows VPS)都无法通过这两种方式访问​​VPS

https://xxx.xxx.xxx.xxx:8443

https://mifos.domain.com:8443.

它只是卡在加载中。

我检查了/var/log/* 和/var/log/tomcat7/* 下的所有日志文件,当我从越南访问时一切正常,但当我从其他国家尝试时甚至没有错误发生

同时检查并允许 iptables 中的端口 8443

admin@ip-172-31-1-14:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp     dpt:8443

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

这是一个服务器设置:

<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener     className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener     className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener     className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <GlobalNamingResources>
       <Resource name="UserDatabase" auth="Container"
          type="org.apache.catalina.UserDatabase"
          description="User database that can be updated and saved"
          factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pathname="conf/tomcat-users.xml"
       />

       <Resource type="javax.sql.DataSource"
        name="jdbc/mifosplatform-tenants"
        factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
        driverClassName="com.mysql.jdbc.Driver"
        url="jdbc:mysql://localhost:3306/mifosplatform-tenants"
        username="root"
        password="zxcasdqwe123"
        initialSize="3"
        maxActive="10"
        maxIdle="6"
        minIdle="3"
        validationQuery="SELECT 1"
        testOnBorrow="true"
        testOnReturn="true"
        testWhileIdle="true"
        timeBetweenEvictionRunsMillis="30000"
        minEvictableIdleTimeMillis="60000"
        logAbandoned="true"
        suspectTimeout="60"
       />
  </GlobalNamingResources>
  <Service name="Catalina">
  <Connector protocol="org.apache.coyote.http11.Http11Protocol"
       port="8443" maxThreads="200"
   scheme="https" secure="true"
   SSLEnabled="true" sslProtocol="TLS"
   keystoreFile="/usr/share/mifosx/checkthecrowd.jks"
   keystorePass="zxcasdqwe123"
   clientAuth="false"
       URIEncoding="UTF-8"
   compression="force"
       compressableMimeType="text/html,text/xml,text/plain,text/javascript,text/css"/>
  <Engine name="Catalina" defaultHost="localhost">
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
      </Realm>

     <Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true">

          <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".log"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
     </Host>
    </Engine>
  </Service>
</Server>

我尝试过一些额外的东西但没有运气:

  • 更改为默认的自签名证书

  • 重启vps

  • 更改弹性IP

  • 更改主机名和域

PS:我有一台安装了 mifos 和 tomcat 的旧服务器,适用于所有国家/地区。

最佳答案

8443 不是标准的 HTTPS 端口。可能存在新加坡 ISP 阻止到非标准端口的传出连接的问题。这是我的建议。使用标准的 HTTPS 端口。 443,看看是否还有问题。

关于ssl - 使用新加坡 IP 时无法通过 AWS 新加坡的 8443 端口访问 tomcat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32437748/

相关文章:

linux - Web 应用程序部署在 Windows 中有效但在 Linux 中失败?

java - Spring Batch 中连接过多异常

java - 如果任何请求在 tomcat 线程池中创建更多线程怎么办

ios - 在 iOS 上安装证书

Javascript 做 ssl 固定?

android - 从 Android 应用程序将视频上​​传到 S3 AWS 会生成一个 0Kb 文件

amazon-web-services - AWS S3 同步 --delete,删除本地的新文件

mod-rewrite - SSL 重写重定向 apache2

ssl - 如何在 openssl 命令行中传递自定义证书

mysql - 远程连接到基于aws-windows实例的MySQL数据库