728x90
반응형
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: KANGSOO LEE
What is the name of your organizational unit?
[Unknown]: Recoeve.net
What is the name of your organization?
[Unknown]: Recoeve.net
What is the name of your City or Locality?
[Unknown]: Korea
What is the name of your State or Province?
[Unknown]: Korea
What is the two-letter country code for this unit?
[Unknown]: KR
Is CN=KANGSOO LEE, OU=Recoeve.net, O=Recoeve.net, L=Korea, ST=Korea, C=KR correct?
[no]: yes
Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 3,650 days
for: CN=KANGSOO LEE, OU=Recoeve.net, O=Recoeve.net, L=Korea, ST=Korea, C=KR
```/
## Default port of HTTPS is 443.
이것땜에 좀 고생을 했는데, https 접속은 port 443 으로 자동으로 연결된다. 이를 모르고 port 80 에 listen 걸어놓고, https://localhost
로 접속하면 응답이 없게됨.
```[.linenums.lang-java]
import io.vertx.core.AbstractVerticle;
import io.vertx.core.http.HttpServerOptions;
import io.vertx.core.http.HttpServerRequest;
import io.vertx.core.net.JksOptions;
import io.vertx.ext.web.Router;
public class Recoeve extends AbstractVerticle {
@Override
public void start() {
Router router=Router.router(vertx);
router.route().handler(ctx -> {
HttpServerRequest req=ctx.request();
System.out.println("A client has connected!");
req.response().putHeader("Content-Type","text/plain; charset=utf-8");
req.response().end("Hello World!", "UTF-8");
});
vertx.createHttpServer(
new HttpServerOptions()
.setUseAlpn(true)
.setSsl(true)
.setKeyStoreOptions(new JksOptions()
.setPath("C:/Recoeve/recoeve.jks")
.setPassword("[--password--]")
)
).requestHandler(router).listen(443);
} // public void start()
} // public class Recoeve extends AbstractVerticle
```/
## EC2 - Security Groups - AWS Inbound rules
AWS Inbound rules 에서 HTTPS TCP port 443 을 열어줘야 함.
## Windows firewall
Server 의 Windows firewall 설정에서도 port 443 을 열어줘야 함. Inbound, Outbound 둘 다.
## RRA
728x90
반응형
'[IT/Programming] > HTML related' 카테고리의 다른 글
How can I block MathJax.js to render texts enclosed by backtick ``? (0) | 2023.03.08 |
---|---|
Learning PHP (0) | 2022.12.30 |
Learning Play Framework (0) | 2022.12.30 |
Netflix iframe 으로 퍼오기. (0) | 2021.03.13 |
실시간 HTTP 양방향 통신 (Web socket, Polling, Long-polling, and so on) (0) | 2019.04.01 |
Specific event handler on HTML element? (0) | 2019.04.01 |
Number and Bit operations in JAVA and Javascript (0) | 2019.03.16 |