Discussion:
strange local apache problems
(too old to reply)
Daniel Bauer
2020-03-21 10:45:25 UTC
Permalink
So ... although the images and the css file are fetched by your mobile,
they are not shown. It might be interesting to "click" on the missing
image on the phone and say "display only image". You would then get to
see the URL, maybe to spot the problem ?
When the phone has fetched the files, I cannot think of any reason why
it would not display them.
It is extremely strange. I tried on another phone with firefox and
(enabled only for this test) with big brother chrome. With the same results.

Now I tried to just open an image. I copied it to the folder where the
index-file is.

The server says

192.168.1.34 - - [21/Mar/2020:11:34:44 +0100] "GET
/Entwicklung/karls/logo_small.png HTTP/1.1" 200 4002 "-" "Mozilla/5.0
(Linux; Android 8.1.0; DRA-L21) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/70.0.3538.110 Mobile Safari/537.36"

so, that seems to be ok.

But chrome says:

This page isn't working
192.168.1.38 unexpectedly closed the connection
ERR_CONTENT_LENGTH_MISMATCH

(there is nothing related in apache2 error.log)

I can load that image in the browser via IP or localhost from the local
computer on which apache runs.
--
Daniel Bauer photographer Basel Málaga
https://www.patreon.com/danielbauer
https://www.daniel-bauer.com
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
To contact the owner, e-mail: opensuse+***@opensuse.org
Per Jessen
2020-03-21 09:59:59 UTC
Permalink
Yes, I have firewalld running, I know since 5 minutes :-)
I stopped it, and - trara! - it (kind of) works.
- can I open port 80 in firewalld settings (I guess I'll find them
somewhere in Yast) without the risk to compromise my computer or the
files that are within the local apache directory htdocs...?
Yep. By opening port 80 on that machine, your apache webserver
becomes available to your local network only.
Ok, I opened that port, and in fact I can reach the server when the
phone is on my wifi-net, but not when it's on the phone-net. Good.
Nice test.
When it doesn't show any images, what do you see instead - a
placeholder
or just nothing? The former would mean the image wasn't found, if
you see nothing at all, something is wrong with the HTML.
I see the "missing image" icon. Styles are not applied, the font is
not used, background colors and images do not appear. (Inline styles
are applied - this is only a temporary page and I added some styles
directly to the lines - but styles from the css-file not)
Okay, so those linked files are not being found.
If you look in the apache logs, you will see 404s for the files that
were not found.
This is the log from the very last try. As much as I see all parts
were loaded correctly. Still styles are not applied and image not
shown on the mobile.
According to the log, as you say, all is being fetched correctly. Weird.
On my local computer the path is /srv/www/htdocs/Entwicklung/project
within the php-file pathes are relative
it works on the same computer, but not on the phone (but it works on
the phone when calling it from the online-internet-server)
"it works on the same computer" ? so when you browse it locally,
which address do you use? localhost or 192.168.x.x ? Try it from
the local computer, but with 192.168.x.x - that ought to produce the
same result as on your phone.
It works on the same computer with 192...
Loading Image...
So ... although the images and the css file are fetched by your mobile,
they are not shown. It might be interesting to "click" on the missing
image on the phone and say "display only image". You would then get to
see the URL, maybe to spot the problem ?

When the phone has fetched the files, I cannot think of any reason why
it would not display them.
Maybe then view the source (ctrl-u) and paste it
somewhere for us to see. Or send it to me.
It's not a big secret :-)
https://www.daniel-bauer.com/div/index2.html.txt
Hmm, I see no problems there.
--
Per Jessen, Zürich (12.2°C)
http://www.dns24.ch/ - your free DNS host, made in Switzerland.
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
To contact the owner, e-mail: opensuse+***@opensuse.org
Daniel Bauer
2020-03-21 11:07:06 UTC
Permalink
I'll open a new thread on this...
Post by Daniel Bauer
So ... although the images and the css file are fetched by your mobile,
they are not shown.  It might be interesting to "click" on the missing
image on the phone and say "display only image".  You would then get to
see the URL, maybe to spot the problem ?
When the phone has fetched the files, I cannot think of any reason why
it would not display them.
It is extremely strange. I tried on another phone with firefox and
(enabled only for this test) with big brother chrome. With the same results.
Now I tried to just open an image. I copied it to the folder where the
index-file is.
The server says
192.168.1.34 - - [21/Mar/2020:11:34:44 +0100] "GET
/Entwicklung/karls/logo_small.png HTTP/1.1" 200 4002 "-" "Mozilla/5.0
(Linux; Android 8.1.0; DRA-L21) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/70.0.3538.110 Mobile Safari/537.36"
so, that seems to be ok.
This page isn't working
192.168.1.38 unexpectedly closed the connection
ERR_CONTENT_LENGTH_MISMATCH
(there is nothing related in apache2 error.log)
I can load that image in the browser via IP or localhost from the local
computer on which apache runs.
--
Daniel Bauer photographer Basel Málaga
https://www.patreon.com/danielbauer
https://www.daniel-bauer.com
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
To contact the owner, e-mail: opensuse+***@opensuse.org
Loading...