Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Nginx 프록시 서버 설정 변경 (TICO-215) #37

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ public class SecurityConfig {

private static final String[] swaggerURL = {
"/graphiql", "/graphql",
"/swagger-ui/**", "/swagger-ui.html",
"/v3/api-docs/**", "/api-docs/**",
"/swagger-ui/index.html/**",
"/swagger-resources/**", "/swagger-ui/**", "/v3/api-docs", "/api-docs/**"
"/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**", "/swagger-resources/**"
};

// 스프링 시큐리티 기능 비활성화 ('인증','인가' 서비스 적용x)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Tag(name = "root", description = "애플리케이션 기본 정보 API")
@Tag(name = "Root", description = "애플리케이션 기본 정보 API")
@RestController
@RequiredArgsConstructor
@RequestMapping("/")
Expand Down
9 changes: 7 additions & 2 deletions nginx/conf/conf.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@ server {
ssl_certificate_key /etc/letsencrypt/live/pomorodo.shop/privkey.pem;

# 원하는 서비스를 제공하는 2차 라우팅
location /api {
proxy_pass http://pomorodo.shop:8080/api;
location / {
proxy_pass http://pomorodo.shop:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# /api 경로 프록시 설정
location /api {
proxy_pass http://localhost:8080/api;
}
}
}
Loading