Portál AbcLinuxu, 12. května 2025 11:30
img src="http://localhost/image.jpg" />
img src="http://moje_veřejná_ip/image.jpg" />
Řešení dotazu:
<img src="image.jpg" />
ethtool -K eth0 tx-scatter-gather on
(netuším co to dělá), vypnout EnableSendfile
v Apachi a je tam bugreport který se mi nechce načíst.
find /etc/apache2/ -type f | xargs grep 'EnableSendfile' find /var/www/ -type f | xargs grep 'EnableSendfile'
linux-x7v9:/etc/apache2 # find /etc/apache2/ -type f | xargs grep 'EnableSendfile' /etc/apache2/httpd.conf:EnableSendfile off /etc/apache2/server-tuning.conf:# EnableSendfile: Control whether the sendfile kernel support is /etc/apache2/server-tuning.conf:EnableSendfile on
# EnableSendfile: Control whether the sendfile kernel support is
# used to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#enablesendfile
takze pricnu problemu bych hledal jindeTak příčina problému je bug, asi v kernelu, který způsobuje, že někdy nefunguje sendfile, ne?
158.194.76.102 - - [05/Nov/2019:19:15:39 +0100] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
158.194.76.102 - - [05/Nov/2019:19:15:39 +0100] "GET /image.png HTTP/1.1" 200 330672 "http://158.194.85.210/" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
/tmp> wget -SO - http://158.194.85.210/image.png --2019-11-06 08:15:19-- http://158.194.85.210/image.png Connecting to 158.194.85.210:80... connected. HTTP request sent, awaiting response... HTTP/1.1 200 OK Date: Wed, 06 Nov 2019 08:14:59 GMT Server: Apache Last-Modified: Fri, 13 Apr 2018 15:31:27 GMT ETag: "50bb0-569bc90c2b1c0" Accept-Ranges: bytes Content-Length: 330672 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: image/png Length: 330672 (323K) [image/png] Saving to: ‘STDOUT’ - 0%[ ] 0 --.-KB/s in 0s 2019-11-06 08:15:19 (0,00 B/s) - Connection closed at byte 0. Retrying.Pokud ty vidíš v logu opravdu že se data přenesla, začal bych podezřívat síť, že někdo cestou do spojení zasahuje (nějaká proxy/IDS u ISP…). Nahrál bych (wireshark, tcpdump) síťový provoz na obou stranách a porovnal.
<img src="//image.jpg">
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.