Forum

Images are not displayed on ErrorHandler.

Alex
11 November 2017, 21:11
How to display the pictures, e. g. logo.png at ErrorHandler?
Thanks in advance.
Alex
11 November 2017, 21:48
I forgot to post my configuration.
VirtualHost {
Hostname = www.site.com
WebsiteRoot = /usr/local/www
ReverseProxy .* http://127.0.0.3:80 120
AccessList = allow myip, deny all
ErrorHandler = 403:/403.html
}
Hugo Leisink
12 November 2017, 13:47
Change /403.html in the ErrorHandler option to /logo.png or include the image in the HTML in 403.html.
Alex
12 November 2017, 15:12
already included to the 403.html
<img src="/logo.png" class="logo" alt="My Logo">

Unfortunately, no success.
When I take a picture from another website, like this
<img src="http://www.another-site.com/logo.png" class="logo" alt="My Logo">

then it works out pretty well.
Alex
12 November 2017, 15:18
The chrome console shows me
GET https://www.site.com/logo.png 403 (Forbidden)
Hugo Leisink
12 November 2017, 21:00
Check the access rights of that file. The webserver should be able to read that file.
Alex
12 November 2017, 23:38
No success also after
chown -R www:www /usr/local/www
chmod 775 /usr/local/www

Any request redirect me to the /403.html
Hugo Leisink
13 November 2017, 00:53
What does the error logfile say?
Alex
13 November 2017, 02:22
error.log
xxx.xxx.xxx.xxx|Mon 13 Nov 2017 02:20:17 +0100|access denied via accesslist

Hugo Leisink
13 November 2017, 07:44
It seems you have specified a restriction via an AccessList setting.
Alex
14 November 2017, 11:52
Yes it is, as I already wrote. Look above to my hiawatha.conf
AccessList = allow myip, deny all
Hugo Leisink
14 November 2017, 17:54
Is the IP address in the access logfile for a request for your 403.html file different from the one for the logo.png.
Alex
14 November 2017, 20:23
Sorry, I don't understand what you mean.
the logo.png is in the same directory as 403.html
I have set my public IP as variable myip
This topic has been closed.