프리미엄
예측대회
투자분석
아카데미
커뮤니티
로그인Valley AI 시작하기시작하기
Valley Space인기
[Spring] 점프투 자바스프링부트
FrugalBoy's JourneySpring(boot)

[Spring] 점프투 자바스프링부트

avatar
FrugalBoy
2024.12.03조회수 2회
avatar
FrugalBoy
구독자 5명구독중 12명
Wanna live like a frugal boy For the genetically superior, success is easier to attain. But it is by no means guaranteed. After all, there is no gene for fate -Gattaca-




server {

listen 80;

server_name localhost;

location / {

proxy_pass http://localhost:8080;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header Host $http_host;

}

}


아래는 코드에 대한 설명


우리의 개발코드는 8080포트에서 돌아감

그런데 우리는 nginx 를 이용해서 localhost:80으로 오는 request들을

localhost:8080으로 보냄. nginx는 여기서 reverse proxy라고 보면 됨


그래서 localhost의 ip주소인 http://52.14.160.27:80을 치면

자동으로 :8080으로 가게됨.


This specific setup is likely part of a web application deployment, where the application server (on port 8080) handles business logic, and NGINX acts as a gateway.


This configuration sets up an NGINX reverse proxy. NGINX acts as a gateway to another server running on localhost:8080. It is commonly used to:


https://chatgpt.com/share/674e9b54-7034-8009-9986-25ace4a64cb7

회원가입만 해도
이 글을 무료로 읽을 수 있어요.

Basic 7일 무료 체험 시작하기
이미 계정이 있으신가요?로그인하기
댓글 0개
아직 작성된 댓글이 없습니다.
Spring(boot) 카테고리의 다른글

[Web] Port 80 vs 8080

Are port 80 == port 8080? Hell No!!! Two ports with two different values can never be same. You must be well aware about the fact that ‘port 80’ is a well-known port for ‘HTTP’ service. Moreover, Internet Assigned Numbers Authority (IANA) has allocated ports ranging from ‘0–1023’ as system or ...
Spring(boot)
2024. 12. 03
0
0
3

[Spring] Entity, DTO, DAO 란?

https://velog.io/@wnsdnjs70/Entity-DAO-DTO%EB%9E%80-%EB%AC%B4%EC%97%87%EC%9D%B4%EB%A9%B0-%EC%99%9C-%EC%82%AC%EC%9A%A9%ED%95%A0%EA%B9%8C Entity Entity란 DB의 테이블에 존재하는 Column들을 필드로 가지는 객체를 말한다. 아래는 답변 db 테이블인 Answer라는 entity임. 즉, 이 answer class의 instance가 entity인듯 @Entity public class Answer { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @Column(columnDefinition = "TEXT") private String content; private LocalDateTime createDate; // answer과 question의 관계는 다대일 관계이므로 아래 annotation 사용! @ManyToOne private Question ...
Spring(boot)
2024. 12. 02
0
0

[Spring] MVC란? 초중요 꼭 보기

https://velog.io/@0andwild/MVC%ED%8C%A8%ED%84%B4Controller-Servicec-Repository%EB%9E%80-%EB%AC%B4%EC%97%87%EC%9D%BC%EA%B9%8CTIL.220526
Spring(boot)
2024. 12. 01
0
0
2

Springboot Service, Repository, Controller 설명

https://velog.io/@seungho1216/Spring-BootController-Service-Repository%EC%97%90-%EB%8C%80%ED%95%98%EC%97%AC
Spring(boot)
2024. 11. 28
0
0
2

[Springboot] Form data(폼 데이터)와 DTO 란?

먼저 html form에 대해 읽어보기 https://www.nextree.co.kr/p8428/ https://achieve-dev.tistory.com/41 https://velog.io/@dani0817/Spring-Boot-%ED%8F%BC-%ED%81%B4%EB%9E%98%EC%8A%A4-%EB%A7%8C%EB%93%A4%EA%B8%B0 ● 폼 데이터(Form Data): 웹 페이지에서 사용자가 입력한 데이터를 서버로 전송하기 위한 형식을 의미합니다. ● DTO(Data Transfer Object)는 서버와 클라이언트 간에 데이터를 효율적으로 전송하기 위해 사용하는 객체를 말합니다.
Spring(boot)
2024. 11. 26
0
0
3
4
[Spring] MVC란? 초중요 꼭 보기
[Springboot] Form data(폼 데이터)와 DTO 란?