Failed to load HTML file

Do you see an error in your server error log file? please ask your sysadmin for help

I am still receiving this error after upgrading to the latest BETA. It doesn’t seem to affect anything though, just an annoyance at this point.

Thanks Matt,

Updated to the latest Beta 2.4.0.b7

Stil get the same error: Failed to load HTML file: Please check your server configuration. You may want to whitelist “*.html” files from the “plugins” directory. The HTTP status code is 404 for URL “plugins/ZenMode/angularjs/quick-access/quick-access.html”

See below the entries from our server log (de-identified) - It seems there are issues with the access rights - Hope this assists


[Tue Jun 24 08:45:50.264113 2014] [core:crit] [pid 1018579] (13)Permission denied: [client MYIP:62788] AH00529: [Piwik Path]/plugins/ZenMode/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that ‘[Piwik Path]/plugins/ZenMode/’ is executable, referer: http://[Piwik Path]/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today

[Tue Jun 24 08:45:49.755328 2014] [access_compat:error] [pid 1018044] [client MYIP:54746] AH01797: client denied by server configuration: [Piwik Path]/misc/user/logo-header.png, referer: http://[Piwik Path]/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today

[Tue Jun 24 08:33:59.541458 2014] [core:crit] [pid 1000252] (13)Permission denied: [client MYIP:57630] AH00529: [Piwik Path]/plugins/ZenMode/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that ‘[Piwik Path]/plugins/ZenMode/’ is executable, referer: http://[Piwik Path]/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today

Cheers
Gman

Did you try setting the permissions of all the files and directories to “readable and executable”?

My server requires this. As a consequence, I have to set everything to “755”, except the configuration file “config/config.ini.php”, which requires 777 while the actual configuration is being done (it gets 755 like all the other files afterwards), and also the “tmp” directory, which should be set to 777.

The “755” permission set is NOT a Piwik requirement – it’s a server requirement.

@Gman447 can you try delete the file [Piwik Path]/plugins/ZenMode/.htaccess if it exists?

Thanks Matt
Unfortunately the file [Piwik Path]/plugins/ZenMode/.htaccess does not exist

The Piwik .htaccess files under our Piwik install are as follows:

[Piwik Path]/vendor/.htaccess
[Piwik Path]/lang/.htaccess
[Piwik Path]/plugins/.htaccess
[Piwik Path]/plugins/DevicesDetection/UserAgentParserEnhanced/.htaccess
[Piwik Path]/misc/.htaccess
[Piwik Path]/misc/user/.htaccess
[Piwik Path]/misc/cron/.htaccess
[Piwik Path]/libs/.htaccess
[Piwik Path]/core/.htaccess
[Piwik Path]/config/.htaccess
[Piwik Path]/js/.htaccess
[Piwik Path]/tmp/.htaccess
[Piwik Path]/tmp/logs/.htaccess
[Piwik Path]/tmp/climulti/.htaccess
[Piwik Path]/tmp/assets/.htaccess
[Piwik Path]/tmp/latest/.htaccess
[Piwik Path]/tmp/tcpdf/.htaccess
[Piwik Path]/tmp/sessions/.htaccess
[Piwik Path]/tmp/templates_c/.htaccess
[Piwik Path]/tmp/cache/.htaccess
[Piwik Path]/themes/.htaccess

However after much exploring I have just worked out how to change folder permissions via the CPanel File Manager and changing the permissions on ALL of the following folders to 755 resulted in FIXING the ZenMode error. [ Finally ! ]

Change Permissions to 755 on the following folders:
[Piwik Path]/plugins/ZenMode
[Piwik Path]/plugins/ZenMode/angularjs
[Piwik Path]/plugins/ZenMode/angularjs/quick-access
[Piwik Path]/plugins/ZenMode/angularjs/zen-mode
[Piwik Path]/plugins/ZenMode/javascript
[Piwik Path]/plugins/ZenMode/lang

Error Problem solved!

HOWEVER…
The issue of the logo header and logo files not appearing has not been fixed.

I have changed the file permissions to 755 for logo.png under the [Piwik Path]/misc/user path however continue to get an access denied when attempting to view - The files have been uploaded correctly and can be downloaded directly, just not viewed within Firefox, IE etc or in Piwik as Access is denied!. Even though the folders have the correct permission AND the files!

On closer inspection I suspect access to the files in the [Piwik Path]/misc/user folder are being blocked by the .htaccess script which currently shows as:

First, deny access to all files in this directory

<Files “*”>

<IfVersion < 2.4>
Order Deny,Allow
Deny from All

= 2.4>
Require all denied


<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
Order Deny,Allow
Deny from All


Require all denied


Serve HTML files as text/html mime type

AddHandler text/html .html
AddHandler text/html .htm

Allow to serve static files which are safe

<Files ~ “.(gif|ico|jpg|png|svg|js|css|htm|html|swf|mp3|mp4|wav|ogg|avi)$”>

<IfVersion < 2.4>
Order Allow,Deny
Allow from All

= 2.4>
Require all granted


<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Allow from All


Require all granted


I have 2.4.0-8b installed

Ideally I’d like to be able to see our images again on the login screen and on the header? Suggestions?

Thanks Matt, we appreciate the support. (tu):)-D

Cheers
Gman B)

@Gman that’s surprising that your logo doesn’t load. What type of error do you get when you open it in browser? what error is then logged in your server error log file?

I followed GMAN’s instructions and changed the permissions on the following folders:

Change Permissions to 755 on the following folders:
[Piwik Path]/plugins/ZenMode
[Piwik Path]/plugins/ZenMode/angularjs
[Piwik Path]/plugins/ZenMode/angularjs/quick-access
[Piwik Path]/plugins/ZenMode/angularjs/zen-mode
[Piwik Path]/plugins/ZenMode/javascript
[Piwik Path]/plugins/ZenMode/lang

All is well again!

Thanks everybody.

@ Flade - awesome ! Glad this forum assisted !!

I just wanted my login and banner images to display so I have kept digging

@Matt:
As above this is what my error log shows:

[Tue Jul 01 15:33:20.605449 2014] [access_compat:error] [pid 630134] [client 118.93.45.112:56093] AH01797: client denied by server configuration: [Piwik Path]/misc/user/favicon.png

[Tue Jul 01 15:33:20.786095 2014] [access_compat:error] [pid 630134] [client 118.93.45.112:56093] AH01797: client denied by server configuration: [Piwik Path]/misc/user/favicon.png

[Tue Jul 01 15:33:24.244273 2014] [access_compat:error] [pid 630206] [client 118.93.45.112:63968] AH01797: client denied by server configuration: [Piwik Path]/misc/user/logo.png, referer: http://[Piwik Path]/

[Tue Jul 01 15:33:24.722774 2014] [access_compat:error] [pid 629230] [client 118.93.45.112:62608] AH01797: client denied by server configuration: [Piwik Path]/misc/user/logo.png, referer: http://[Piwik Path]/

[Tue Jul 01 15:34:11.552494 2014] [access_compat:error] [pid 630492] [client 118.93.45.112:58127] AH01797: client denied by server configuration: [Piwik Path]/misc/user/logo-header.png, referer: http://[Piwik Path]/index.php?module=CoreHome&action=index&idSite=1&period=day&date=today

Folder & File Permissions
[Piwik Path]/misc Permissions = 755
[Piwik Path]/misc/User Permissions = 755

[Piwik Path]/misc/User/favicon.png Permissions = 755
[Piwik Path]/misc/User/logo-header.png Permissions = 755
[Piwik Path]/misc/User/logo.png Permissions = 755
[Piwik Path]/misc/User/index.html Permissions = 644

If go to view these images via Cpanel FileManager in any client (ie11, FF, Chrome etc), I get the following error:

Forbidden
You don’t have permission to access [Piwik Path]/misc/user/logo.png on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I can of course donwload the files directly without issue via the Cpanel FileManager - hence thinking it is being blocked by a .htacess somewhere

I re-named the .htaccess in the /misc/user folder and it made no difference to accessing the files.

THEN…

I re-named the .htaccess in the /misc/ folder AND it removed / fixed the block and provided FULL access

The offending .htaccess script in the /misc/ folder is:

<Files “*”>

Deny from all

<IfModule !mod_access_compat>

Deny from all



Deny from all

</Files

Without this script being active both the log-in and banner images display correct and no errors are thrown to the error log.

Alas … issue fixed … not sure what, if any, impact it will have elsewhere but the login and banner images display! Images are now also displaying correctly under the Settings/General Settings - Branding Settings area - previously they were not displaying here either!

Very happy now! (:P)

Keep up the great support and development! :)-D

Cheers
Gman! B)

I’m having this issue now on various websites on hosted servers (2 different companies) after upgrade to 2.4.0. I have seen it before but could fix it before by setting folder permissions in the whole path to 755. Now it seems to affect a considerable amount of folders in “plugins”. The permission fix does not help now. The error occurs on the “all websites” dashboard. The message is:

Failed to load HTML file: Please check your server configuration. You may want to whitelist “*.html” files from the “plugins” directory. The HTTP status code is 500 for URL “plugins/MultiSites/angularjs/dashboard/dashboard.html”

.htaccess in the plugins folder seems to allow for html (but I don’t know if my provider has these modules installed):


# First, deny access to all files in this directory
<Files "*">
<IfModule mod_version.c>
	<IfVersion < 2.4>
		Order Deny,Allow
		Deny from All
	</IfVersion>
	<IfVersion >= 2.4>
		Require all denied
	</IfVersion>
</IfModule>
<IfModule !mod_version.c>
	<IfModule !mod_authz_core.c>
		Order Deny,Allow
		Deny from All
	</IfModule>
	<IfModule mod_authz_core.c>
		Require all denied
	</IfModule>
</IfModule>
</Files>
# Serve HTML files as text/html mime type
AddHandler text/html .html
AddHandler text/html .htm

# Allow to serve static files which are safe
<Files ~ "\.(gif|ico|jpg|png|svg|js|css|htm|html|swf|mp3|mp4|wav|ogg|avi)$">
<IfModule mod_version.c>
	<IfVersion < 2.4>
		Order Allow,Deny
		Allow from All
	</IfVersion>
	<IfVersion >= 2.4>
		Require all granted
	</IfVersion>
</IfModule>
<IfModule !mod_version.c>
	<IfModule !mod_authz_core.c>
		Order Allow,Deny
		Allow from All
	</IfModule>
	<IfModule mod_authz_core.c>
		Require all granted
	</IfModule>
</IfModule>
</Files>

Update to my own post: I checked the server error logs and I found many entries of the kind:


[Wed Jul 02 09:49:34 2014] [alert] [client 78.80.13.55] /path to piwik/plugins/.htaccess: AddHandler not allowed here

After commenting out the two lines with AddHandler, the error has disappeared and also the image /plugins/Morpheus/images/reload.png is back!

Thanks for the report! I’ve created a bug report: Error message in server log: plugins/.htaccess: AddHandler not allowed here · Issue #5398 · matomo-org/matomo · GitHub

If other users experience this issue please post a comment in this ticket as it will help us!

Also what version of apache are you using?

Apache: 2.2
System: Linux
Server API: CGI/FastCGI

Have the same problem but in my case it isn’t an AddHandler problem. I remove the Addhandler part and still have this problem.


[Wed Jul 02 14:26:14 2014] [error] [client 8?.2?.1?.3?] client denied by server configuration: / path to my Piwik/plugins/MultiSites/angularjs/dashboard/plugins, referer: http://tracking.sbg-is.de/plugins/MultiSites/angularjs/dashboard/dashboard.html?cb=91781cbf58daa9fde9ebe89224884d52

Just to clarify: Part of my solution was also to fix the permissions in the plugin subfolders, and only then I removed the “AddHandler” lines.

I had this same problem. Removing the Addhandler lines corrected it.

I am running the bleeding edge stable release of both PHP and Apache, thats probably why.

Server version: Apache/2.4.9 (Ubuntu)
Server built: Apr 1 2014 08:52:12

PHP:
/var/www/stats/plugins# php -v
PHP 5.5.14-2+deb.sury.org~precise+1 (cli) (built: Jul 2 2014 12:07:02)
Copyright © 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright © 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright © 1999-2014, by Zend Technologies

Same problem. Upgraded to 2.4.1 and bam!

Unfortunately, my plugins/.htaccess has no AddHandler directive that I can remove so as to solve this issue. Here is its contents:


# First, deny access to all files in this directory
<Files "*">
<IfModule mod_version.c>
	<IfVersion < 2.4>
		Order Deny,Allow
		Deny from All
	</IfVersion>
	<IfVersion >= 2.4>
		Require all denied
	</IfVersion>
</IfModule>
<IfModule !mod_version.c>
	<IfModule !mod_authz_core.c>
		Order Deny,Allow
		Deny from All
	</IfModule>
	<IfModule mod_authz_core.c>
		Require all denied
	</IfModule>
</IfModule>
</Files>
# Allow to serve static files which are safe
<Files ~ "\.(test\.php|gif|ico|jpg|png|svg|js|css|htm|html|swf|mp3|mp4|wav|ogg|avi)$">
<IfModule mod_version.c>
	<IfVersion < 2.4>
		Order Allow,Deny
		Allow from All
	</IfVersion>
	<IfVersion >= 2.4>
		Require all granted
	</IfVersion>
</IfModule>
<IfModule !mod_version.c>
	<IfModule !mod_authz_core.c>
		Order Allow,Deny
		Allow from All
	</IfModule>
	<IfModule mod_authz_core.c>
		Require all granted
	</IfModule>
</IfModule>
</Files>

Nothing ended up working for me, so I just deleted .htaccess and now it works.

@Fever905: which htaccess did you delete? The one in the “plugins” folder, right?

After updating to the latest Piwik version, I had multiple sites showing this:

Failed to load HTML file: Please check your server configuration. You may want to whitelist “*.html” files from the “plugins” directory. The HTTP status code is 403 for URL “plugins/SitesManager/templates/index.html”

when I try to load “Websites” page under Manage.

I just tested one of the sites, and after deleting .htaccess in Piwik’s plugin subflder, things went back to normal.

I must say that I cannot recall when was the last time I check this page, so it is possible that this problem existed in some of the previous versions as well.

How crucial is this .htaccess?

Thanks

P.S.
I have some sites running the same latest Piwik version, and when I take a look into the plugin subfolder, there is no .htaccess file at all. Why is this?