티스토리 뷰

아파치 가상호스트 설정하기

PHP7을 설치 하였으니 가상호스트를 설정해보자.


1.


vi /usr/local/etc/apache2/2.4/httpd.conf
 
# Virtual hosts
Include /usr/local/etc/apache2/2.4/extra/httpd-vhosts.conf
 
주석제거
cs


2.


vi /usr/local/etc/apache2/2.4/extra/httpd-vhosts.conf
 
<VirtualHost *:80>
    ServerAdmin PROJECT1@PROJECT1.co.kr
    DocumentRoot "/Users/*****/Documents/PROJECT ADDRESS"
    ServerName api.paynowshop.co.kr
    ErrorLog "/usr/local/var/log/apache2/dummy-host.example.com-error_log"
    CustomLog /usr/local/var/log/apache2/dummy-host.example.com-access_log common
</VirtualHost>
<VirtualHost *:80>
    ServerAdmin PROJECT2@PROJECT2.co.kr
    DocumentRoot "/Users/*****/Documents/PROJECT ADDRESS"
    ServerName dev.paynowshop.co.kr
    ErrorLog "/usr/local/var/log/apache2/dummy-host.example.com-error_log"
    CustomLog /usr/local/var/log/apache2/dummy-host.example.com-access_log common
</VirtualHost>
 
cs


3.


vi /etc/hosts
127.0.0.PROJECT1@PROJECT1.co.kr
127.0.0.PROJECT2@PROJECT2.co.kr
 
추가
cs


'STUDY > ETC' 카테고리의 다른 글

sourcetree  (0) 2018.01.22
SlickGrid  (0) 2018.01.22
아파치 가상호스트 설정하기  (0) 2018.01.22
PHP 설치  (0) 2018.01.22
SVN / GIT 특징  (0) 2018.01.22
git 설치  (0) 2018.01.22

Recent Comments