2017년 9월 28일 목요일

OffsetDateTime, ZonedDateTime, Instant

The javadocs say this:

  • "OffsetDateTime, ZonedDateTime and Instant all store an instant on the time-line to nanosecond precision. Instant is the simplest, simply representing the instant. OffsetDateTime adds to the instant the offset from UTC/Greenwich, which allows the local date-time to be obtained. ZonedDateTime adds full time-zone rules."

2017년 9월 20일 수요일

Tomcat 포트(80->8080, 443->8443) 라우팅 설정

iptables 설정
  • # iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
  • # iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443
  • # netstat -ntl or iptables -t nat -L
  • # iptables restart
server.xml 변경
  • <Connector port="8080" proxyPort="80" protocol="HTTP/1.1"
               connectionTimeout="20000"
               enableLookups="false"
               redirectPort="443"
               URIEncoding="UTF-8" />
  • <Connector protocol="org.apache.coyote.http11.Http11NioProtocol"
           keyAlias="tomcat"
           port="8443" proxyPort="443" maxThreads="200"
           scheme="https" secure="true" SSLEnabled="true"
           keystoreFile="conf/keystore파일" keystorePass="키스토어비밀번호"
           clientAuth="false" sslProtocol="TLS" />
참고
  • http://devzeroty.tistory.com/entry/Tomcat-80-443%ED%8F%AC%ED%8A%B8-NonRoot-%EA%B3%84%EC%A0%95%EC%9C%BC%EB%A1%9C-%EB%9D%84%EC%9A%B0%EA%B8%B0