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

时间:2015-09-07 11:36:34

标签: ssl amazon-web-services tomcat7

我按照this教程在新加坡地区的debian EC3中安装带有tomcat7的Mifosx。

然后我跟着this来为我的服务器提供一个免费的startSSL。

越南的一切都很好(已经尝试过改变IP,改变PC ......还可以)

但其他国家(即使是我在新加坡的朋友和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>

我没试过的一些额外的东西:

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

  • reboot vps

  • 更改弹性IP

  • 更改主机名和域

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

1 个答案:

答案 0 :(得分:0)

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