1. https-vhost 파일을 연다.
<Directory "프로젝트들의 최상단 경로"> ex) C:/dev/projects
Order deny,allow
Deny from all
Allow from 허용할 아이피 주소 (복수개 사용)
Allow from ...
Allow from ...
...
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
C:/dev/projects 하위 프로젝트를 접근하기 위한 설정
<VirtualHost *:80>
ServerName host.a.com
ServerAlias www.a.com
DocumentRoot "C:/dev/projects/a/"
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php\?/$1 [L]
</VirtualHost>
<VirtualHost *:80>
ServerName host.b.com //서버명, 알리아스둘다접근
ServerAlias www.b.com
DocumentRoot "C:/dev/projects/b/"
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f //파일이 아닐경우
RewriteCond %{REQUEST_FILENAME} !-d //디렉토리가 아닐경우
RewriteRule ^(.*)$ /index.php\?/$1 [L] // index.php 로드한다.
</VirtualHost>
<VirtualHost *:80>
ServerName host.c.com
ServerAlias www.c.com
DocumentRoot "C:/dev/projects/c/"
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php\?/$1 [L]
</VirtualHost>
위 설정으로 하면 로컬의 경우 호스트 파일에 등록하고 하나의 아파치에서 a,b,c
php 웹 사이트 3개를 구동 가능 하게 한다.
예외 설정
css 라는 경로가 포함된경우 index.php 를 태우기 싫다면 아래와 같은 Cond 를 추가한다.
RewriteCond %{REQUEST_URI} !^/css/(.*)$
피드 구독하기:
댓글 (Atom)
[lunux]리눅스 폴더별 용량 확인
리눅스 폴더별 용량 확인 조회 하고자 하는 디렉토리 리스트가있는 경로로 이동후 du -h --max-depth=1
-
pom.xml <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId&g...
-
수십대의 서버에 특정 쉘을 실행한다거나 파일을 수정해야할경우 호스트 입력 아이디 입력 패스워드 입력은 여간 짜증나는일이 아닐수 없다. 이를 한방에 해주는 방법 teraterm 를 설치한다( putty 는 버리자 ) 예를 들면 19...
-
자바에서 redis 를 사용할때는 jedis 라는 wrapping api 를 사용 하는데 기본 사용법은 메이븐에 아래 의존 라이브러리를 추가하고 <dependency> <groupId>redis.clients</g...
댓글 없음:
댓글 쓰기