개발도구/WAS

tomcat port 추가

노루아부지 2019. 7. 27. 01:15

tomcat에 port를 추가하기 위해서는 conf 폴더 안에 server.xml을 수정해 줘야 한다.

파일을 열어서 </Service> 밑에 아래 내용을 추가

<!-- Service name 지정 -->
<Service name="test1">
	<!-- Connector port, redirectPort 지정 -->
	<Connector executor="tomcatThreadPool" 
                     URIEncoding="UTF-8"
                     port="80"
                     protocol="HTTP/1.1"
                     connectionTimeout="20000"
                     redirectPort="8444" />

	<Connector port="8091" protocol="AJP/1.3" redirectPort="8444" />
	<Engine name="test1" defaultHost="localhost">
    	<!-- 
        	name : 인턴넷 주소창에 쳐서 들어갈 주소 입력
			appBase : name에 씌여진 주소로 들어왔을 때 어느 경로로 들어갈지 지정
					appBase만 설정해 놓을 경우,  Context는 appBase를 기준으로 생각하기 때문에
					예) include "../common/db.jsp"와 같이 되어있을 경우
						경로를  "/../common//db.jsp"로 해석하여 보내는 현상이 발생한다.
						따라서 appBase는 Host 내에 여러개의 Context를 둘 수 있으므로, 
						webapps까지 써야 하고
						docBase는 appBase 하위의 WEB-INF를 포함한 본인의 폴더를 지정
						appBase에 절대경로를 입력할 수도 있다.
		-->
		<Host name="192.168.2.54"  
    			appBase="webapps"
				unpackWARs="true" autoDeploy="true"
				xmlValidation="false" xmlNamespaceAware="false">
			<Context path="" docBase="Console" reloadable="true" privileged="true"/>
		</Host>
	</Engine>
</Service>

 

728x90

'개발도구 > WAS' 카테고리의 다른 글

Tocat 6.0 Cotext setting  (0) 2019.08.11
Tomcat에서 DBCP 사용  (0) 2019.08.11
CentOS에 Tomcat 설치  (0) 2019.08.11
tomcat + openssl  (0) 2019.07.31
tomcat favicon setting  (0) 2019.07.27
loading