K
K
khataev2014-08-03 22:45:16
linux
khataev, 2014-08-03 22:45:16

What is missing to display an image as the background of an html page?

A simple site template hosted locally on Windows 7 (not via IIS).
/root
/root/css
/root/css/stylesheet.css
/root/images
/root/images/flower.jpg
/root/index.html
HTML and css code at . I'm testing in Chrome. When the link to the background-image is in the form of a hyperlink, then everything works, but if it is a link to the /images/flower.jpg file on disk, then it doesn't! Are there any rights missing or something else?
Thank you!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Azazel PW, 2016-05-17
@WaGe

do netstat -tnlp
if it still costs localhost
127.0.0.1:8000
then the server listens only to itself.
Alter the config to listen to all 0.0.0.0
Then issue access through iptables. for example, as Vladimir showed only because of the absence of the OUTPUT
iptables -A INPUT -p tcp --dport 8000 -j ACCEPT entry
iptables -A INPUT -p udp --dport 8000 -j ACCEPT
Vladimir Musikhin , OUTPUT is not needed if the connection is established from an external source. There, the data is already transmitted in the established state.
Yes, and in principle, this key is mainly used for NATirovanie network.

S
Schoolboy., 2016-05-16
@viphorizon

iptables -A INPUT -p tcp --dport 8000 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 8000 -j ACCEPT

V
Victor, 2016-05-16
@Victor_M

It makes sense to look at the file /etc/hosts.allow
Syntax:
Service (ALL - all) : client_ip : action (allow|deny) The
rule that was executed first works ...
PS anyway on freebsd it works like this

J
Jeiwan, 2014-08-03
@khataev

/images/flower.jpg is the wrong path. / at the beginning of the path indicates that the search will be performed at the root (C:/images/flower.jpg).
images/flower.jpg - this should work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question