1. 컴퓨터 시스템 확인하기 (운영체제, 32비티/64비트 여부 확인)

 

 

2. 아파치 서버 설치를 위한 Visual C++ 재배포 가능 패키지 설치 여부 확인, 없으면 설치.

Be sure you installed latest 14.24.28127.4 Visual C++ Redistributable for Visual Studio 2015-2019 : vc_redist_x64 or vc_redist_x86 see Redistributable

 

3. 아파치(Apache) 설치 (아파치는 pc를 웹서버로 만들어주는 프로그램이다)

https://www.apachelounge.com/download/

 

Apache VS16 binaries and modules download

Apache 2.4 VS16 Windows Binaries and Modules Apache Lounge has provided up-to-date Windows binaries and popular third-party modules for more than 15 years. We have hundreds of thousands of satisfied users: small and big companies as well as home users. Alw

www.apachelounge.com

다운받은걸 c: 드라이브에 압출을 풀어줍니다. 

 

4. 아파치 설치 폴더\conf " 경로에 있는 httpd.conf 파일을 확인/수정 해야 합니다. 

 

(1) 서버 루트 경로 Define SRVROOT "c:/Apache24" (이와 다를 경우 수정)

(2) 포트버호 변경(기본은 80, 다른거 하고 싶은경우 변경) Listen 80

(3) 웹문서 저장위치 확인 DocumentRoot "${SRVROOT}/htdocs"

(4) 서버네임변경 #ServerName www.example.com:80

  #ServerName www.example.com:80 을 찾아서 #을 제거하고

ServerName localhost:80  또는

ServerName 127.0.0.1:80

라고 바꿔줍니다. 이러면 외부 인터넷망 미연결 시에도 브라우저에서 http://localhost/ 를 입력해서 홈페이지 데이터를 불러올 수 있습니다. 뒤의 80포트는 (2)에서 Listen 포트를 변경했다면 반드시 일치시켜 주어야 합니다.

결론적으로 아파치를 C:\Apache24 에 압축을 풀고 기본설정을 유지한다면 (4)번 항목만 수정하면 됩니다.

 

5. 아파치 서비스를 윈도우에 등록하기

Win키+R을 누르고 control 을 입력합니다. (제어판에 들어가서) 그리고 시스템→고급 시스템 설정→고급 탭의 “환경 변수(N)” 단추를 누릅니다.

 

6. 시스템변수 Path에 C:\Apache24\bin등록하기

 

8.  윈도우+X 그리고 windows powershell(관리자) 선택합니다. 

9.  관리자:Windows PowerShell에서 htted -k install 그리고 액세스 허용합니다. 

10. 아파치 서비스 시작 httpd -k start 입력하고 웹브라우저 주소창에 http://localhost 또는 http://127.0.0.1 이라고 입력해 봅니다. 만약 포트를 변경했었다면(예:4040) http://localhost:4040 같은 형태로 입력해야합니다. 그리고 It works!라고 문구가 뜨면 성공입니다. 

아파치 서비스 종료(중지)는 httpd -k stop

아파치 서비스 재시작은 httpd.exe -k restart

아파치 서비스 제거는 httpd.exe -k uninstall 혹은 httpd.exe -k uninstall -n APM_Apache2

 

 

+ Recent posts