/var/www/html
하위에 서브디렉토리 3개정도의 프로젝트를 운영중인데요.
.htaccess 파일이 각 프로젝트 밑에 하나씩 들어가있고
잘 작동중이였습니다.
/etc/apache2/apache2.conf 파일에는
해당 서브디렉토리들이
<Directory /var/www>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/1번프로젝트>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /var/www/2번프로젝트>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
문제가 있는건 2번 프로젝트인데요 계속해서 not found 에러가 납니다. 그렇다고 하위 디렉토리에 있는 다른 디렉토리가 보이지 않는거두 아닌데요.. 이미지 파일 이런 경로도 다 보입니다.
.htacces 파일은 기존 프로젝트들과 같게 설정했습니다.
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond $1 !^(index\.php|images|captcha|data|include|uploads|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !^/data/(.&)$ RewriteRule ^(.*)$ 디렉토리명/index.php/$1 [L] </IfModule>
대략 이런 형태입니다. 상단에는 aws 설정에 맞게 http에서 https로 리다이렉트 시키는 부분이 들어가있습니다.
1번 프로젝트는 잘 작동했는데 2번 프로젝트를 설치해서 들어가려하니 잘안됩니다.
apache error로그를 살펴보니
[client 172.31.21.56:9086] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: https://도메인/프로젝트명/
해결됐습니다.
컨트롤러와 모델에 첫글자가 대문자가 아니였네요 ..;