TIP게시판

제목 가상화서버 환경에서는 index.php 지우기를 하려면 httpd.conf가 아녔네요
글쓴이 김대영 작성시각 2016/03/02 15:54:30
댓글 : 4 추천 : 0 스크랩 : 0 조회수 : 13076   RSS

워낙 LINUX 기본 지식이 없다보니 httpd.conf하고 .htaccess 만 계속 수정하면서 삽질만 했네요

가상화 서버에선 httpd-vhost.conf 파일안에 <Directory "/"> AllowOverride All </Directory>적용 하는 거였군요 ^^;;;

[httpd-vhost.conf]

<VirtualHost sample.domain.com:80>
    ServerAdmin webmaster@domain.com
    DocumentRoot "/samplesite/webroot"
    ServerName sample.domain.com
    ErrorLog "/var/log/httpd/sample.domain.com-error_log"
    CustomLog "/var/log/httpd/sample.domain.com-access_log" common
    <Directory "/samplesite/root/sub">
        Options Indexes FollowSymLinks
        AllowOverride All
    </Directory>
</VirtualHost>

[/samplesite/root/sub/.htaccess]

RewriteEngine On
RewriteCond $1 !^(index\.php|images|captcha|data|include|uploads|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]

처음이라 쉽지 않네요

 다음글 스마일서브 가상서버 신청시 참고사항 (1)
 이전글 타서버와 연동중에 갑자기 2006에러가 발생

댓글

한대승(불의회상) / 2016/03/03 08:12:14 / 추천 0
좋은 정보 감사 합니다. ^^
kaido / 2016/03/03 08:45:31 / 추천 0
뭐든지 처음이 어렵죠 ㅎㅎ 한번 하고 나면 참 별거 아닌것을 고 몇줄 때문에 사람을 미치게 만들죠 ㅜㅜ
김대영 / 2016/03/03 10:39:57 / 추천 0

한대승 // 부끄럽습니다 다 아시는 건데

kaido // 미치기 전 까지 갔습니다.

빛그림 / 2016/03/07 16:38:16 / 추천 0

가상서버나 물리서버나 동일 합니다.

저의 경우는 httpd.conf 안에 아래와 같은 구문을 넣어주고 httpd-vhosts.conf 안에 <Directoty /> ~ </Directory>는 빼고 사용합니다. 여러개의 버추얼호스트 설정을 좀 줄이기 위함이죠. ^^

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>