어제 내 아파치 서버가 더 이상 실행되지 않기로 결정했는데 지금은 이유를 모르겠습니다. 모든 가상 호스트는 로그 파일에서 복사한 다음과 같은 403-Error-Message를 표시합니다.
[error] [client 127.0.0.1] (13)Permission denied: access to / denied
권한이 올바르게 설정되었다고 생각하며 ls -al /home/...으로 증명했습니다. 그리고 실제로 구성에서 아무것도 변경하지 않았습니다.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName webprojekte
DocumentRoot /home/tarea/Webprojekte/work
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/tarea/Webprojekte/work/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
그런데 phpmyadmin은 여전히 올바르게 작동하고 있습니다. 도와주셔서 감사합니다!
답변1
구성이 아니라 파일 권한 자체입니다. chmod
웹 루트 디렉터리는 755로, 웹 파일은 664로 설정해야 합니다 .
훨씬 더 나은 해결책은 Apache에서 사용자 모듈을 사용하는 것입니다. 이를 통해 사용자는 홈 디렉터리의 public_html 폴더 내에서 파일을 호스팅할 수 있습니다.
자세한 내용은 다음을 참조하세요.