
/var/www/html/htc 디렉토리에 bookmatic.net에 대한 특정 규칙이 있는 .htaccess 파일이 있고 /var/www/html의 모든 도메인에 대한 일반 규칙이 있는 또 다른 .htaccess 파일이 있습니다.
bookmatic.net에 액세스할 때 /htc에 있는 .htaccess 파일은 잘 실행되지만 /html에 있는 파일은 무시됩니다. 누구든지 도와줄 수 있나요?
httpd.conf의 bookmatic.net 사양은 다음과 같습니다.
<VirtualHost *:443>
ServerName bookmatic.net
ServerAlias *.bookmatic.net
DocumentRoot /var/www/html/htc
AllowEncodedSlashes On
<Directory /var/www/html/htc>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
LimitRequestBody 25000000
LimitXMLRequestBody 25000000
</Directory>
RewriteEngine on
</VirtualHost>
답변1
AllowOverride All
.htaccess
Apache에게 추가 구성을 위해 파일을 찾도록 지시하는 지시어입니다 .
해당 가상 호스트 는 Apache 에게 .htaccess
./var/www/html/htc
.htaccess
/var/www/html
이 문제를 해결하는 한 가지 방법은 다음과 같은 또 다른 블록을 만드는 것입니다( httpd.conf
더 합리적이라면 이 가상 호스트 대신에 가능).
<Directory /var/www/html>
AllowOverride All
</Directory>
답변2
당신 AllowOverride All
은 <Directory /var/www/html/htc>
. 에서는 허용되지 않는 것 같아요 /var/www/html
. 다음을 시도해 볼 수 있습니다.
<Directory /var/www/html>
AllowOverride All
</Directory>