Forum: NGINX Images loaded but not displaying

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
De7b680154f831d87d8ea48743852f14?d=identicon&s=25 skorpinok (Guest)
on 2016-07-16 10:31
(Received via mailing list)
Hi, i have installed nginx/1.2.1 on a debian 7 server, the image seems
to
have been  loaded but shows broken &  are not displayed on my index.html
page

here is what  did,

html>
<head>
<title>Welcome to nginx!</title>
</head>
<body bgcolor="white" text="black">
<center><h1>Welcome to nginx!</h1></center>
</body>
</html>

</head>
<body>

<img src="/usr/share/nginx/www/images/infographic.jpg" alt="infographic"
width="800" height="800">

</body>
</html>



please suggest me how to fix this ?

Regards
skorpinok

Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,268312,268312#msg-268312
6ef603046430a61be6725bbe432a2356?d=identicon&s=25 Ian Hobson (Guest)
on 2016-07-16 11:40
(Received via mailing list)
Hi skorpinok

Two points:

1) Use correct HTML, or you can only blame yourself if different
browsers mangle it each in their own way.

The structure is
<!DOCTYPE html>         Html 5 only.
<html>
<head>
   <title ....>

</head>
<body>
   page content properly nested.

</body>
</html>
(eof)

2) The src url takes its root as the location of the current page
(unless overridden with a base tag in the head area).

My guess is you need
<img src="/images/infographic.jpg" ....

Regards

Ian
De7b680154f831d87d8ea48743852f14?d=identicon&s=25 skorpinok (Guest)
on 2016-07-16 11:57
(Received via mailing list)
Hi, Ian Hobson, thanks its fixed,  <img src="/images/infographic.jpg"
- is
the right way

Regards
skorpinok

Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,268312,268314#msg-268314
187c77fbd13c54f990b63d0df95a6cb1?d=identicon&s=25 Pratyush Kumar (Guest)
on 2016-07-16 17:30
(Received via mailing list)
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
This topic is locked and can not be replied to.