내 로컬 네트워크에 나만의 작은 웹 사이트를 만들려고합니다. 이미지를 제외한 모든 것이 잘 작동합니다. 이상한 이유로 내 웹 사이트에서 이미지를로드 할 수 없습니다.
HTML의 루트 폴더는 /var/www/html
입니다.
/var/www/html/test.html
:
<html>
<head>
<title>test</title>
</head>
<body>
<img src="sniky.png">
</body>
</html>
ls -l /var/www/html
:
-rwxrwxrwx 1 root root 2155 Jun 18 08:57 bp.html
-rwxrwxrwx 1 root root 2296 Jun 17 23:12 filmy.html
-rwxrwxrwx 1 root root 1776 Jun 17 23:03 index.html
-rwxrwxrwx 1 root root 1886 Jun 17 23:11 info.html
-rwxrwxrwx 1 root root 1 Jun 17 22:18 serialy.html
-rwxrwxrwx 1 root root 897669 Jun 18 08:54 sniky.jpg
-rwxrwxrwx 1 root root 93 Jun 18 08:54 test.html
Apache2 구성 ( /etc/apache2/apache2.conf
) :
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
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>
오류가 있습니다 :
에 의해 주어진 파일 목록에 따르면 ls
, 이미지 파일이 있습니다 .jpg
파일이 아닌 .png
파일
당신은 당신의 html 코드를 검토 할 수 있습니다
<html>
<head>
<title>test</title>
</head>
<body>
<img src="sniky.jpg">
</body>
</html>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다