개발 ON
  • [Network | Windows] Apache 설치
    2024년 08월 08일 09시 31분 19초에 업로드 된 글입니다.
    작성자: 이주여이

    Windows로 배포하는 걸 보게 되었는데 과정 중 하나인 Apache 설치를 위한 포스팅이다.

    다소 설명이 불친절하므로 안읽는 게 낫다.

     

    1. Apache2.4 설치

    https://www.apachelounge.com/download/ 링크에서 Apache 2.4.62-240718 Win64로 받으면 된다.

    압축 파일은 C 드라이브에 풀었다.

     

    ServerRoot, Listen, ServerName, DocumentRoot를 변경해주면 된다고 한다.

    Windows 운영체제로 배포할 때도 Linux랑 비슷하게 설정하는 것 같다.

    참고 레퍼런스와 다르게 설정해보았다.

    • ServerRoot - 단순 주석인 것 같아서 일단 주석 해제 안하기로 했다.
    • Listen - http 기본 포트인 80으로 그냥 놔두면 될 것 같아서 일단 놔뒀다.
    • ServerName - 일단 localhost로 해봤다. 여기는 주석 해제를 해야한다.
    • DocumentRoot - Linux로 배포할 때 안건드려서 일단 놔뒀다.

    2. httpd 실행

    1. cmd 관리자 실행
    2. Apache2.4 bin 디렉토리 경로 복사
    3. cmd 작업
      cd는 경로 이동 명령어이며 httpd는 Apache 웹 서버를 뜻한다.
      Microsoft Windows [Version 10.0.22631.3880]
      (c) Microsoft Corporation. All rights reserved.
      
      C:\Windows\System32>cd C:\Apache24\bin
      
      C:\Apache24\bin>httpd -k install
      Installing the 'Apache2.4' service
      The 'Apache2.4' service is successfully installed.
      Testing httpd.conf....
      Errors reported here must be corrected before the service can be started.

    3. 서비스 실행

    4. URL 접속 테스트

    localhost는 호스트 PC의 IP를 의미하며 Apache의 설정 파일인 httpd.conf 파일에서 기본 포트인 80으로 설정했기 때문에 URL로 접근할 때는 localhost:80 으로 접근한다.


    참고 레퍼런스

    https://8lackcat.tistory.com/212

    'Network > Windows' 카테고리의 다른 글

    [Network | Windows] IPv4 주소가 공인 IP로 나올 때  (0) 2024.09.07
    댓글