> For the complete documentation index, see [llms.txt](https://flamme1004.gitbook.io/flamme-dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flamme1004.gitbook.io/flamme-dev/info-1/server-1/tomcat/virtual-host-port.md).

# Virtual Host(Port)

![](/files/-MFJP8UJwzjgqHhR0046)

톰캣 virtual host를 포트로 관리를 하려면 service를 하나 더 선언해야 한다.

HTTP에 대한 포트번호 그리고 redirectPort도 같이 올라갈 Service와 달라야 합니다. (물론 name도 바꿔줘야 합니다.!)

그리고 webapp또한 바꿀 수 있습니다. appBase에 webapp에 대한 경로를 넣어주면 되고 안에 context에는 docBase로 ROOT설정을 해주면 됩니다.

그리고 실행을 해봤더니 AJP Address가 이미 사용되고 있다는 에러가 났습니다.

![](/files/-MFJP1EOhdyCkNuc1yDE)

이것을 해결하기 위해서는 AJP또한 포트번호를 바꿧어야 했습니다. 이걸 바꿧더니 정삭적으로 실행이 되었습니다.

&#x20;요번에 찾으면서 AJP에 대해서도 알았습니다.

&#x20;AJP?&#x20;

AJP는 웹서버(Apache) 뒤에 있는 어플리케이션 서버로부터 웹서버로 들어오늘 요청을 위임할 수 있는 바이너리 프로토콜이다.\
\
출처: <https://noobnim.tistory.com/26> \[생각만 하지 말고 기록하자]

<https://www.lesstif.com/linux-infra-book/%EC%95%84%ED%8C%8C%EC%B9%98-%EC%9B%B9-%EC%84%9C%EB%B2%84%EC%99%80-%EC%97%B0%EB%8F%99%ED%95%98%EA%B8%B0-20776817.html>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://flamme1004.gitbook.io/flamme-dev/info-1/server-1/tomcat/virtual-host-port.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
