[Apache] 각 VirtualHost 에서 php include_path 다르게 설정하기
페이지 정보
작성자 서방님 댓글 0건 조회 155회 작성일 16-11-19 08:59본문
.htaccess를 이용하는 방법도 있으나 파일도 하나 더 만들어야 되고 귀찮음.
그리고 각 서버 상태에 따라 이것저것 달라진다.
xampp에서 하려니 뭐 잘 안되기도 하고...
VirtualHost 설정시 그냥 같이 해버리는 방법이 짱인 듯.
xampp 기준으로 C:\xampp\apache\conf\extra\httpd-vhosts.conf 파일을 아래처럼 수정해주면 가능함.
그리고 각 서버 상태에 따라 이것저것 달라진다.
xampp에서 하려니 뭐 잘 안되기도 하고...
VirtualHost 설정시 그냥 같이 해버리는 방법이 짱인 듯.
xampp 기준으로 C:\xampp\apache\conf\extra\httpd-vhosts.conf 파일을 아래처럼 수정해주면 가능함.
NameVirtualHost *
<VirtualHost *>
ServerName localhost
DocumentRoot "C:\xampp\htdocs"
</VirtualHost>
<VirtualHost *>
ServerName myhome.localhost.com
DocumentRoot "C:\myhome"
<Directory "C:\myhome">
AllowOverride All
Options All
php_value include_path ".;C:\xampp\php\pear;C:\myhome\mylibrary"
</Directory>
</VirtualHost>
<VirtualHost *>
ServerName localhost
DocumentRoot "C:\xampp\htdocs"
</VirtualHost>
<VirtualHost *>
ServerName myhome.localhost.com
DocumentRoot "C:\myhome"
<Directory "C:\myhome">
AllowOverride All
Options All
php_value include_path ".;C:\xampp\php\pear;C:\myhome\mylibrary"
</Directory>
</VirtualHost>
댓글목록
등록된 댓글이 없습니다.