
여러 게시물을 살펴봤지만 제 문제를 해결한 게시물이 없어서 질문드립니다.
저는 도메인이나 하위 도메인을 설정한 적이 없으므로 간단한 실수라도 문제가 될 수 있습니다.
체계:
- 데비안 6.0.6
- 아파치2.2.16
내가 지금까지 한 일:
- A 레코드를 만들었습니다. (잘 해결된 것 같습니다)
다음과 같은 사이트 사용 가능 구성 파일을 추가했습니다.
<VirtualHost *:80> ServerAdmin [email protected] ServerName m.mores.es DocumentRoot /var/www/internet/movil/ <Directory /> Options Indexes FollowSymLinks Includes ExecCGI DirectoryIndex index.php index.html AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/m.mores.es-error.log CustomLog /var/log/apache2/m.mores.es-access.log combined </VirtualHost>
나는 a2ensite m.mores.es 명령을 실행했습니다 (사용 가능한 사이트에서 생성된 파일 이름)
아파치를 다시 시작했습니다.
여기서 금지된 오류가 발생합니다.
- 폴더 권한을 775로 반복적으로 변경했습니다.
- 아파치를 다시 시작했습니다.
금지된 오류가 발생합니다.
어떤 단서가 있나요?
아파치 로그 편집: 이것이 핵심일 수 있습니다. 이 로그는 파일에 다른 로그 파일을 설정할 때 "other_vhosts_access.log"에 나타납니다. m.mores.es에 대한 액세스 파일과 오류 파일이 모두 존재하지만 비어 있습니다. 이것은 m.mores.es에 대한 내용이 있는 유일한 로그입니다.
m.mores.es:80 212.89.22.73 - - [15/Jun/2015:17:02:54 +0200] "GET /index.html HTTP/1.1" 403 237 "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
m.mores.es:80 212.89.22.73 - - [15/Jun/2015:17:02:54 +0200] "GET /index.html HTTP/1.1" 403 237 "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
m.mores.es:80 212.89.22.73 - - [15/Jun/2015:17:02:55 +0200] "GET /favicon.ico HTTP/1.1" 302 241 "http://m.mores.es/index.html" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
m.mores.es:80 212.89.22.73 - - [15/Jun/2015:17:02:55 +0200] "GET /favicon.ico HTTP/1.1" 302 241 "http://m.mores.es/index.html" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
m.mores.es:80 212.89.22.73 - - [15/Jun/2015:17:03:01 +0200] "GET /index.php HTTP/1.1" 302 241 "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36"
m.mores.es:80 212.89.22.73 - - [15/Jun/2015:17:03:01 +0200] "GET /index.php HTTP/1.1" 302 241 "-" "Mozilla/5.0 (Windows NT 5.1)
답변1
DocumentRoot를 로 설정했지만 /var/www/internet/movil/
디렉토리를 /
. 라고 바꿔보세요
<Directory /var/www/internet/movil>
또한 경로에서 후행 슬래시를 제거해야 합니다.
전체 가상 호스트는 다음과 같습니다:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName m.mores.es
DocumentRoot /var/www/internet/movil
<Directory /var/www/internet/movil>
Options Indexes FollowSymLinks Includes ExecCGI
DirectoryIndex index.php index.html
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/m.mores.es-error.log
CustomLog /var/log/apache2/m.mores.es-access.log combined
</VirtualHost>
아파치를 다시로드하면 작동합니다
답변2
SELinux를 활성화한 경우 이것이 원인일 수 있습니다.
sudo vim /var/log/audit/audit.log
또는 sudo tail -f /var/log/audit/audit.log
그리고
sudo ls -Z /var/www/internet/movil/
semanage fcontext를 사용하면 이를 수정할 수 있습니다.