내 index.htm 파일의 이미지를 표시 할 수없는 문제가 있습니다. index.htm 파일의 내용은 다음과 같습니다 :apache 웹 서버에서 이미지를 볼 수 없습니다.
[[email protected]:/etc/httpd/conf]:cat /var/www/html/index.htm
<!DOCTYPE html>
<html>
<head>
<title>httpd server</title>
</head>
<body>
<h1>
First H1 Tag
</h1>
<p> My First para</p>
<h1> Second H1 tag .</h1>
<p>My Second Para</p>
<a href="https://google.com.au">Google</a>
<img src="http://192.168.1.6/lord_shiva_on_bull.jpg" alt="Shiva" width="200" height="200">
</body>
</html>
[[email protected]:/etc/httpd/conf]:
구성에서 일부 발췌 :
ServerRoot "/etc/httpd"
[[email protected]:/etc/httpd/conf]:ls -larth /var/www/html/lord_shiva_on_bull.jpg
-rwxrwxrwx. 1 jim jim 165K Aug 13 11:54 /var/www/html/lord_shiva_on_bull.jpg
[[email protected]:/etc/httpd/conf]:ls -larth /var/www/html/
total 172K
-rwxrwxrwx. 1 jim jim 165K Aug 13 11:54 lord_shiva_on_bull.jpg
drwxrwxrwx. 2 root root 6 Aug 13 12:21 src
drwxr-xr-x. 4 root root 31 Aug 13 13:04 ..
-rwxrwxrwx. 1 root root 323 Aug 13 13:08 index.htm
drwxr-xr-x. 3 root root 61 Aug 13 13:08 .
[[email protected]:/etc/httpd/conf]:ls -ld /var/www/html/
drwxr-xr-x. 3 root root 61 Aug 13 13:08 /var/www/html/
[[email protected]:/etc/httpd/conf]:id apache
uid=48(apache) gid=48(apache) groups=48(apache)
[[email protected]:/etc/httpd/conf]:grep "apache" httpd.conf
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
User apache
Group apache
# http://httpd.apache.org/docs/2.4/mod/core.html#options
[[email protected]:/etc/httpd/conf]:
나는 문제가 무엇인지에 완전히 혼란 스러워요? 크게 이러한
drwxr-XR-X와 같은 권한의 끝에서 배운 전문가의
브라우저에서 이미지의 URL을 열면 어떤 오류가 발생합니까? – pistache
금지됨 이 서버에서 /lord_shiva_on_bull.jpg에 액세스 할 수있는 권한이 없습니다. – learner
Apache2 서버 오류 로그 ('error.log', 아마도'/ var/log/apache2')를보십시오. 또한 권한이 잘못되어 안전하지 않습니다 (다른 사람이 허용하지 않음). 파일 소유자는 동일하지 않습니다. – pistache