Hi, i’m trying to enable webp support in Wordpress through the Webp Express plugin.
I encounter this error message:
`It seems your server setup does not support headers in *.htaccess*. You should either fix this (install *mod_headers*) *or* deactivate the "Enable direct redirection to existing converted images?" option. Otherwise the *Vary:Accept* header will not be added and this can result in problems for users behind proxy servers (ie used in larger companies)`
Should I have enabled this during installation or what’s the best way to enable it?
Isn’t it installed by default for security reasons?
This is my setup:
Proxy Server: nginx
Web Server: apache2
Backend Server: php-fpm
The reason for not loading certain apache mods is that the team thinks that not enough users would need it and the panel should be as lean as possible.
I enabled module headers with a2enmod headers after that I restarted apache2 and rebooted the server. Than I checked with sudo a2enmod headers with positive output: Module headers already enabled
Do I need to do something else? The error message isn’t gone yet.
I used Smush pro plugin for both compression and easy webp delivery configuration. Few lines in htaccess , removing webp from nginx, bulk compression and it indeed took around 20% from the images.
@jlguerrero and @eris It seems that “mod_rewrite” and “mod_headers” : could not be determined although they are loaded.
- .htaccess files enabled?: yes
- mod_rewrite working?: could not be determined
- mod_headers loaded?: yes
- mod_headers working (header set): no
- passing variables from .htaccess to PHP script through environment variable working?: yes
- Can run php test file in plugins/webp-express/wod/ ?: yes
- Can run php test file in plugins/webp-express/wod2/ ?: yes
- Directives for granting access like its done in wod/.htaccess allowed?: yes
The full system report of Webp Express:
System info:
- PHP version: 8.0.15
- OS: Linux
- Server software: Apache/2.4.52 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f
- Document Root status: Available and its "realpath" is available too. Can be used for structuring cache dir.
- Document Root: /home/client-username/web/client-website.nl/public_html
- Document Root: Available and its "realpath" is available too. Can be used for structuring cache dir.
- Apache module "mod_rewrite" enabled?: could not be determined
- Apache module "mod_headers" enabled?: could not be determined
Wordpress info:
- Version: 5.9
- Multisite?: no
- Is wp-content moved?: no
- Is uploads moved out of wp-content?: no
- Is plugins moved out of wp-content?: no
Image roots (absolute paths)
uploads: /home/client-username/web/client-website.nl/public_html/wp-content/uploads
themes: /home/client-username/web/client-website.nl/public_html/wp-content/themes
plugins: /home/client-username/web/client-website.nl/public_html/wp-content/plugins
wp-content: /home/client-username/web/client-website.nl/public_html/wp-content
index: /home/client-username/web/client-website.nl/public_html
Image roots (relative to document root)
uploads: wp-content/uploads
themes: wp-content/themes
plugins: wp-content/plugins
wp-content: wp-content
index: .
Image roots (URLs)
uploads: https://client-website.nl/wp-content/uploads
themes: https://client-website.nl/wp-content/themes
plugins: https://client-website.nl/wp-content/plugins
wp-content: https://client-website.nl/wp-content
index: https://client-website.nl
WebP Express configuration info:
- Destination folder: separate
- Destination extension: append
- Destination structure: image-roots
(To view all configuration, take a look at the config file, which is stored in /home/client-username/web/client-website.nl/public_html/wp-content/webp-express/config/config.json)
Live tests of .htaccess capabilities / system configuration:
Unless noted otherwise, the tests are run in wp-content/webp-express/htaccess-capability-tester.
WebPExpress currently treats the results as they neccessarily applies to all scopes (upload, themes, etc),
but note that a server might be configured to have mod_rewrite disallowed in some folders and allowed in others.
- .htaccess files enabled?: yes
- mod_rewrite working?: could not be determined
- mod_headers loaded?: yes
- mod_headers working (header set): no
- passing variables from .htaccess to PHP script through environment variable working?: yes
- Can run php test file in plugins/webp-express/wod/ ?: yes
- Can run php test file in plugins/webp-express/wod2/ ?: yes
- Directives for granting access like its done in wod/.htaccess allowed?: yes
.htaccess files that WebP Express have placed rules in the following files:
- /home/client-username/web/client-website.nl/public_html/wp-content/uploads/.htaccess
- /home/client-username/web/client-website.nl/public_html/wp-content/themes/.htaccess
- /home/client-username/web/client-website.nl/public_html/wp-content/webp-express/webp-images/.htaccess```