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
'[IT/Programming] > HTML related' 카테고리의 다른 글
인터넷, Web, HTML, 블로그에서 수식 사용하기 (Equation or math in HTML, blog) (4) | 2023.01.31 |
---|---|
Learning PHP (0) | 2022.12.30 |
Learning Play Framework (0) | 2022.12.30 |
인스타그램 (Instagram) 퍼오는 법 (2) | 2022.12.29 |
imgur - Embed album (2) | 2022.12.29 |
SNS 내보내기/공유하기 (Sharing a URI link through SNS) (0) | 2022.12.28 |
Super Easy Edit (SEE) of docuK (0) | 2022.12.26 |