B
B
bagerman2015-07-03 14:15:22
Apache HTTP Server
bagerman, 2015-07-03 14:15:22

Why is the webserver not loading the image?

Hello!
There are files: index.html and image.png.
In index.html code like this:

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
   <p>Hello world!</p>
  <img src="image.png">
</body>
</html>

If this code is placed on the desktop and run, the image will be displayed.
And if you put the code and the image in a folder on the server and go to localhost, then the image is not loaded, and in the console it gives the following error:
GET localhost/image.png 403 (Forbidden)
Please help me figure it out.
Thanks

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mokhirjon Naimov, 2015-07-03
@zvermafia

You need to set read permissions...

A
Andrew, 2015-07-03
@mblp

not enough information.
1. webserver config?
2. Do you put files in the root?
3. Are there more files?
4. You go to localhost or localhost/index.html

A
Alexander Sukherev, 2015-07-03
@kropotor

it looks like there is an angular.png file on the desktop but not in the folder.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question