Mailing List Archive

missing image
Hi all,

Apache 2.4.56.

I'm trying to set up a holding page that would catch all traffic
(including errors) and redirect to a very basic holding page.

It seems to be working now as I want. Apart from the logo image missing
if I supply any multi level path, e.g:

1. Logo showing:

https://holding.matrixscience.com/invalid.php
https://holding.matrixscience.com/invalid

2. Logo missing:

https://holding.matrixscience.com/invalid/
https://holding.matrixscience.com/invalid/invalid.php
https://holding.matrixscience.com/invalid1/invalid2/invalid.html

I've already tried replacing relative path to the image with absolute
but it made no difference.

Any ideas?

Thanks,
Adam


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: missing image [ In reply to ]
On 1/31/24 02:26 PM, Adam Weremczuk wrote:
>
> I've already tried replacing relative path to the image with absolute
> but it made no difference.
>
> Any ideas?
>

do you have a live example with the absolute path? the broken ones that
i looked at all had the relative paths which (understandably) doesn't work.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: missing image [ In reply to ]
On Wed, Jan 31, 2024 at 2:54?PM Sherrard Burton <sburton@allafrica.com>
wrote:

>
>
> On 1/31/24 02:26 PM, Adam Weremczuk wrote:
> >
> > I've already tried replacing relative path to the image with absolute
> > but it made no difference.
> >
> > Any ideas?
> >
>
> do you have a live example with the absolute path? the broken ones that
> i looked at all had the relative paths which (understandably) doesn't work.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
This sounds more like an html/content issue, unless httpd is mangling the
request via mod_rewrite or another directive.

In any case, if you get 404 responses, increase the log level and check the
error log first.
Re: missing image [ In reply to ]
Hi Sherrard,

My index.html is super simple:

--------------------------------------------------

<!doctype html>

<html>

<head>

<style>
p {text-align: center;}
</style>

<title>UNAVAILABLE</title>

</head>

<body bgcolor="FFFFFF">

<center><img src="ms-logo.png" align="top"> </center>

<p style="color: red">
The Matrix Science website is currently unavailable.</br>
We apologise for the unexpected downtime.<br/>
If you require assistance, please contact <a
href=mailto:support@matrixscience.com>support@matrixscience.com</a>.
</p>

</body>

</html>

--------------------------------------------------

Apache config file is very basic as well:

--------------------------------------------------

<VirtualHost *:80>

ServerName holding.matrixscience.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/holding

ErrorLog ${APACHE_LOG_DIR}/holding/error.log
CustomLog ${APACHE_LOG_DIR}/holding/access.log combined

<Directory /var/www/html/holding/>
Options Indexes FollowSymLinks
AllowOverride FileInfo
Require all granted
</Directory>
</VirtualHost>

--------------------------------------------------

and .htaccess in root directory to handle errors:

--------------------------------------------------

ErrorDocument 400 /
ErrorDocument 401 /
ErrorDocument 402 /
ErrorDocument 403 /
ErrorDocument 404 /
ErrorDocument 405 /
ErrorDocument 406 /
ErrorDocument 407 /
ErrorDocument 408 /
ErrorDocument 409 /
ErrorDocument 410 /
ErrorDocument 411 /
ErrorDocument 412 /
ErrorDocument 413 /
ErrorDocument 414 /
ErrorDocument 415 /
ErrorDocument 416 /
ErrorDocument 417 /
ErrorDocument 422 /
ErrorDocument 423 /
ErrorDocument 424 /
ErrorDocument 426 /
ErrorDocument 428 /
ErrorDocument 429 /
ErrorDocument 431 /
ErrorDocument 451 /
ErrorDocument 500 /
ErrorDocument 501 /
ErrorDocument 502 /
ErrorDocument 503 /
ErrorDocument 504 /
ErrorDocument 505 /
ErrorDocument 506 /
ErrorDocument 507 /
ErrorDocument 508 /
ErrorDocument 510 /
ErrorDocument 511 /

--------------------------------------------------

After I replace:

img src="ms-logo.png"

with

img src="/var/www/html/holding/ms-logo.png" (valid path)

the image doesn't even show on the home page.

Regards,
Adam


On 31/01/2024 19:53, Sherrard Burton wrote:
>
>
> On 1/31/24 02:26 PM, Adam Weremczuk wrote:
>>
>> I've already tried replacing relative path to the image with absolute
>> but it made no difference.
>>
>> Any ideas?
>>
>
> do you have a live example with the absolute path? the broken ones that
> i looked at all had the relative paths which (understandably) doesn't work.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: missing image [ In reply to ]
On 2/1/24 8:25 AM, Adam Weremczuk wrote:
> Hi Sherrard,
>
> My index.html is super simple:
<snip>

sorry if i wasn't clear. i was asking if you had the version with the
absolute path posted on your site. no matter, see the below.

> After I replace:
>
> img src="ms-logo.png"
>
> with
>
> img src="/var/www/html/holding/ms-logo.png"   (valid path)
>
> the image doesn't even show on the home page.

that is not the correct form of the absolute URL. absolute URLs are
based at your DocumentRoot. so since your DocumentRoot is

DocumentRoot /var/www/html/holding

the correct absolute URL would be "/ms-logo.png"", and the resulting img
tag would be

<img src="/ms-logo.png">

HTH

best,
Sherrard

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: missing image [ In reply to ]
Yup, all it needed was that missing slash. TA!

On 01/02/2024 13:46, Sherrard Burton wrote:
> that is not the correct form of the absolute URL. absolute URLs are
> based at your DocumentRoot. so since your DocumentRoot is
>
> DocumentRoot /var/www/html/holding
>
> the correct absolute URL would be "/ms-logo.png"", and the resulting
> img tag would be
>
> <img src="/ms-logo.png">
>
> HTH
>
> best,
> Sherrard

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org