Apache 설정

유영·2023년 3월 2일
0

PHP

목록 보기
9/57

1.httpd.conf 설정

1.httpd.conf 편집
: apache설정을 확인하려면 텍스트 편집기가 필요하다.
운영체제에 따라 편집기가 다르다.
<텍스트 편집기>

windowsmaclinux
editplus,notepad++mivim
  • windows
    C:\xampp\apache\conf\httpd.conf
  • mac
    Applications/ XAMPP/xamppfiles/etc/http.conf
  • linux
    /opt/lampp/etc/httpd.conf

-ServerRoot
: 설정 파일이나 로그 파일의 기점이 되는 디렉터리를 설정하는[ServerRoot]
httpd.conf 파일 안에서 상대경로로 기술되어 있는 디렉터리는 ServerRoot 디렉터리의 위치를 기준으로 한다.

windows : 37행
mac : 31행
linux : 31행

  • Listen
    :apache가 사용하는 포트를 지정
    표준으로는 80번을 사용

  • LoadModule
    :apache가 읽어 들일 모듈을 설정

  • ServerAdmin

  • ServerName
    :[서버명:포트번호], [서버명], [ip주소]

  • DocumentRoot
    : 웹으로 공개되는 콘텐츠를 설치하는 디렉터리

  • AllowOverride
    : 이 설정값이 All이면 .htaccess파일을 사용가능
    xampp 설치시 기본값으로 All이 설정되어 있다.

  • DirectoryIndex를 설정하기

2.Apache 재시작

0개의 댓글