IT/문제 해결
아파치, 톰캣 포트번호 변경하기
나27
2017. 11. 6. 10:29
반응형
아파치 포트번호 변경하기
아파치 기본 포트번호는 80인데 포트번호를 변경하고자 한다면
아파치 폴더->conf->httpd.conf 파일을 메모장으로 열거나
Notepad++ 등으로 연다
https://notepad-plus-plus.org/
1 2 3 4 | #Listen 12.34.56.78:80 Listen 80 # |
1 2 3 4 5 6 7 | # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # ServerName 127.0.0.1:80 | cs |
Listen 부분의 포트 번호와
ServerName의 포트 번호(만약 #ServerName으로 되어있다면
# 삭제)를 바꿔주고 서로 일치시켜 준다
인코딩은 UTF-8로 해준다
톰캣 포트번호 변경하기
톰캣이 설치된 폴더->conf->server.xml 파일을 메모장이나 Notepad++등의 프로그램으로 연다
1 2 3 | <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> | cs |
로 되어있는 부분에
8080 부분을 원하는 포트로 변경해준다
'localhost에서 연결을 거부했습니다' 라는 메시지가 나올 때에도
포트번호를 변경해보자
UTF-8로 저장한다
반응형