【发布时间】:2015-06-16 13:36:31
【问题描述】:
我有一个 vaadin 7 应用程序在 EC2 服务器上的 tomcat 7 上运行。该应用程序通过端口 8080 运行,因此我使用以下命令将我的域从 80 重定向到 8080:
/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
现在,我需要使用应该在端口 8443 或 443 上运行的 SSL 证书,但是使用 sudo netstat -nlp 检查我的端口,我得到了:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2332/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2371/sendmail
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2987/mysqld
tcp 0 0 :::8080 :::* LISTEN 3204/java
tcp 0 0 :::80 :::* LISTEN 3151/httpd
tcp 0 0 :::22 :::* LISTEN 2332/sshd
tcp 0 0 ::ffff:127.0.0.1:8005 :::* LISTEN 3204/java
tcp 0 0 :::8009 :::* LISTEN 3204/java
udp 0 0 0.0.0.0:68 0.0.0.0:* 2063/dhclient
udp 0 0 172.30.0.27:123 0.0.0.0:* 2356/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 2356/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 2356/ntpd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 1742 2987/mysqld /var/lib/mysql/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 10316 2151/dbus-daemon /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 9565 1/init @/com/ubuntu/upstart
unix 2 [ ACC ] SEQPACKET LISTENING 9820 1578/udevd @/org/kernel/udev/udevd
所以,据我了解,这些端口甚至都不存在...我如何“激活”它们,然后将它们用于我的 https 连接?
【问题讨论】:
标签: ssl amazon-ec2 tomcat7 port vaadin