무소의 뿔처럼
php apach24 본문
설치 후
apach24폴더 - conf - httpd.conf 메모장으로 열어 Define SRVROOT 경로 수정
DirectoryIndex에 index.php를 추가
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used. If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
Define SRVROOT "C:\아파치가있는폴더\Apache24"
ServerRoot "${SRVROOT}"
##########
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
##########
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:\APM\Apache24\htdocs"
<Directory "${SRVROOT}/htdocs">
###########
#맨 아랫줄에 추가
PHPIniDir "C:/php7"
LoadModule php7_module "C:/php7/php7apache2_4.dll"
AddType application/x-httpd-php .html .php
AddHandler application/x-httpd-php .php
LoadModule php7_module "C:/php7/php7apache2_4.dll"를 할때
그 경로에는 php7가 설치되어 있을것이고, " php7apache2_4.dll " 파일도 있어야 한다.
처음 다운로드 받은 php는 php7apache2_4.dll 파일이 없었다.
환경변수 path: apach24\bin 까지 해서 추가
cmd - 관리자모드 - httpd -k install
apach24 폴더 - bin - apach service monitor에서 실행하고 초록불까지 확인.
브라우저에 apach24실행 확인
http://localhost/
'알아두기 > PHP' 카테고리의 다른 글
PHP 업로드 파일 용량 제한하기, Warning: POST Content-Length (0) | 2022.11.11 |
---|---|
PHP 로컬폴더에 저장된 이미지, html img 태그로 화면 출력 (0) | 2022.11.09 |
PHP textarea와 nl2br 그리고 DB (0) | 2022.11.09 |
php7 설정 (0) | 2022.09.26 |
이클립스 js추가 [ help ] - [ install new software...] (0) | 2022.09.25 |
Comments