Microsoft MVP성태의 닷넷 이야기
개발 환경 구성: 324. 윈도우용 XAMPP의 아파치 서버 구성 방법 [링크 복사], [링크+제목 복사]
조회: 11382
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 1개 있습니다.)

윈도우용 XAMPP의 아파치 서버 구성 방법

XAMPP의 사이트에서도 나오지만,

XAMPP Apache + MariaDB + PHP + Perl
; https://www.apachefriends.org/index.html

XAMPP is the most popular PHP development environment

주 목적은 PHP 개발 환경입니다. 단지 PHP의 호스팅을 위해 아파치 서버가 있는 것인데요. 그래서 XAMPP를 설치하면 저 4가지 구성 요소들이 모두 한꺼번에 동작할 수 있는 환경이 마련됩니다.

설치가 정말 간편한데요, 윈도우의 경우 다음의 사이트에서 다운로드해,

xampp 다운로드
; https://www.apachefriends.org/download.html

xampp-win32-7.1.8-0-VC14-installer.exe
; https://www.apachefriends.org/xampp-files/7.1.8/xampp-win32-7.1.8-0-VC14-installer.exe

xampp-win32-7.1.8-0-VC14.zip
; https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/7.1.8/xampp-win32-7.1.8-0-VC14.zip/download

설치 파일 말고, .zip 파일로 다운로드 받아 그냥 압축을 풀어도 됩니다. 이 글에서는 "C:\temp\xampp" 폴더에 압축을 해제한 걸로 가정합니다. 이후, ./setup_xampp.bat 파일을 실행하면 다음과 같이 xampp 하위에 있는 구성 요소들의 설정을 마무리합니다.

################################# START XAMPP TEST SECTION #################################
[XAMPP]: Test php.exe with php\php.exe -n -d output_buffering=0 --version ...
PHP 7.1.8 (cli) (built: Aug  1 2017 21:10:46) ( ZTS MSVC14 (Visual C++ 2015) x86 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
[XAMPP]: Test for the php.exe successfully passed. Good!
################################# END XAMPP TEST SECTION ###################################


  ########################################################################
  # ApacheFriends XAMPP setup win32 Version                              #
  #----------------------------------------------------------------------#
  # Copyright (c) 2002-2017 Apachefriends 7.1.8
                          #
  #----------------------------------------------------------------------#
  # Authors: Kay Vogelgesang <kvo@apachefriends.org>                     #
  #          Carsten Wiedmann <webmaster@wiedmann-online.de>             #
  ########################################################################

  Configure XAMPP with awk for 'Windows_NT'
  Updating configuration files ... please wait ...  DONE!


  ##### Have fun with ApacheFriends XAMPP! #####

사실, 위의 setup_xampp.bat 파일이 하는 대부분의 작업은 구성 요소들에 미리 기본값으로 설정된 폴더 경로를 setup_xampp.bat 파일이 실행된 경로를 기준으로 다시 설정하는 것이 대부분입니다.

이 상태에서 .\apache_start.bat을 실행하면 대부분의 윈도우 개발자 PC에서 다음과 같은 오류가 발생합니다.

Diese Eingabeforderung nicht waehrend des Running beenden
Bitte erst bei einem gewollten Shutdown schliessen
Please close this command only for Shutdown
Apache 2 is starting ...
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions.  : AH00072: make_sock: could not bind to address [::]:80
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions.  : AH00072: make_sock: could not bind to address 0.0.0.0:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs

Apache konnte nicht gestartet werden
Apache could not be started

왜냐하면, IIS 서버가 80 포트를 미리 점유하고 있기 때문인데, 기본 설치된 xampp는 아파치 서버를 80 포트로 설정하고 있기 때문입니다. 따라서, 다음의 파일을 열어,

.\xampp\apache\conf\httpd.conf

"Listen 80"으로 설정된 항목을 찾아 원하는 포트로 수정합니다. (이 글에서는 8080으로 수정한 것입니다.)

Listen 8080

끝입니다. 이제 다시 .\apache_start.bat을 실행하면 apache 서버가 정상적으로 올라오고 웹 브라우저를 이용해 http://localhost:8080으로 접속하면 XAMPP가 기본 준비한 웹 페이지들이 서비스됩니다. 아파치 서버의 기본 루트를 변경하고 싶다면 역시 httpd.conf 파일의 DocumentRoot 항목의 값을 변경해 주면 됩니다.

DocumentRoot "C:/temp/xampp/htdocs"




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 9/3/2017]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




1  2  3  [4]  5  6  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
13534정성태1/21/20242242닷넷: 2207. C# - SQL Server DB를 bacpac으로 Export/Import파일 다운로드1
13533정성태1/18/20242454닷넷: 2206. C# - TCP KeepAlive의 서버 측 구현파일 다운로드1
13532정성태1/17/20242349닷넷: 2205. C# - SuperSimpleTcp 사용 시 주의할 점파일 다운로드1
13531정성태1/16/20242243닷넷: 2204. C# - TCP KeepAlive에 새로 추가된 Retry 옵션파일 다운로드1
13530정성태1/15/20242197닷넷: 2203. C# - Python과의 AES 암호화 연동파일 다운로드1
13529정성태1/15/20242056닷넷: 2202. C# - PublishAot의 glibc에 대한 정적 링킹하는 방법
13528정성태1/14/20242181Linux: 68. busybox 컨테이너에서 실행 가능한 C++, Go 프로그램 빌드
13527정성태1/14/20242125오류 유형: 892. Visual Studio - Failed to launch debug adapter. Additional information may be available in the output window.
13526정성태1/14/20242208닷넷: 2201. C# - Facebook 연동 / 사용자 탈퇴 처리 방법
13525정성태1/13/20242160오류 유형: 891. Visual Studio - Web Application을 실행하지 못하는 IISExpress
13524정성태1/12/20242223오류 유형: 890. 한국투자증권 KIS Developers OpenAPI - GW라우팅 중 오류가 발생했습니다.
13523정성태1/12/20242032오류 유형: 889. Visual Studio - error : A project with that name is already opened in the solution.
13522정성태1/11/20242194닷넷: 2200. C# - HttpClient.PostAsJsonAsync 호출 시 "Transfer-Encoding: chunked" 대신 "Content-Length" 헤더 처리
13521정성태1/11/20242260닷넷: 2199. C# - 한국투자증권 KIS Developers OpenAPI의 WebSocket Ping, Pong 처리
13520정성태1/10/20242004오류 유형: 888. C# - Unable to resolve service for type 'Microsoft.Extensions.ObjectPool.ObjectPool`....'
13519정성태1/10/20242094닷넷: 2198. C# - Reflection을 이용한 ClientWebSocket의 Ping 호출파일 다운로드1
13518정성태1/9/20242360닷넷: 2197. C# - ClientWebSocket의 Ping, Pong 처리
13517정성태1/8/20242200스크립트: 63. Python - 공개 패키지를 이용한 위성 이미지 생성 (pystac_client, odc.stac)
13516정성태1/7/20242311닷넷: 2196. IIS - AppPool의 "Disable Overlapped Recycle" 옵션의 부작용
13515정성태1/6/20242587닷넷: 2195. async 메서드 내에서 C# 7의 discard 구문 활용 사례 [1]
13514정성태1/5/20242260개발 환경 구성: 702. IIS - AppPool의 "Disable Overlapped Recycle" 옵션
13513정성태1/5/20242181닷넷: 2194. C# - WebActivatorEx / System.Web의 PreApplicationStartMethod 특성
13512정성태1/4/20242149개발 환경 구성: 701. IIS - w3wp.exe 프로세스의 ASP.NET 런타임을 항상 Warmup 모드로 유지하는 preload Enabled 설정
13511정성태1/4/20242171닷넷: 2193. C# - ASP.NET Web Application + OpenAPI(Swashbuckle) 스펙 제공
13510정성태1/3/20242103닷넷: 2192. C# - 특정 실행 파일이 있는지 확인하는 방법 (Linux)
13509정성태1/3/20242144오류 유형: 887. .NET Core 2 이하의 프로젝트에서 System.Runtime.CompilerServices.Unsafe doesn't support netcoreapp2.0.
1  2  3  [4]  5  6  7  8  9  10  11  12  13  14  15  ...