#1 Le 13/05/2020, à 13:55
- RolandG
[apache] module Server Side Inclusions (SSI) [résolu]
Hi,
I try to use apache Server Side Inclusions (SSI).
I have told in my main directory .htaccess what to do with a 404 error :
ErrorDocument 404 /admin/erreurs/err404.html
I have validate SSI upon executables files in .htaccess of admin/errors/ :
Options +Includes
XBitHack on
I have set permissions of my test file :
chmod +x err404.html
My test file contains some test lines using SSI calls :
REDIRECT_HTTP_ACCEPT<!--#echo var="REDIRECT_HTTP_ACCEPT" --><br>
REDIRECT_HTTP_USER_AGENT<!--#echo var="REDIRECT_HTTP_USER_AGENT" --><br>
REDIRECT_PATH<!--#echo var="REDIRECT_PATH" --><br>
REDIRECT_QUERY_STRING<!--#echo var="REDIRECT_QUERY_STRING" --><br>
REDIRECT_REMOTE_ADDR<!--#echo var="REDIRECT_REMOTE_ADDR" --><br>
REDIRECT_REMOTE_HOST<!--#echo var="REDIRECT_REMOTE_HOST" --><br>
But, when I call an unknown page, I only got an old wave 404 page :
Not Found
The requested URL was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.4.29 (Ubuntu) Server at speedytools.tools Port 80
And I got, in the website error log :
[Wed May 13 12:16:42.069010 2020] [core:alert] [pid 5751] [client 91.170.93.64:11732] /nuage/speedytools.tools/admin/erreurs/.htaccess: Invalid command 'XBitHack', perhaps misspelled or defined by a module not included in the server configuration
So, I discover that
- no include.mod nor mod-include.mod appear in the /etc/apache2/mods-enabled directory
- no include.mod nor mod-include.mod appear in the /etc/apache2/mods-available directory
- BUT an include.load file appear in the mods-available directory, wich contains :
# Depends: mime
LoadModule include_module /usr/lib/apache2/modules/mod_include.so
Which I do not know using.
Could you please help me ?
Dernière modification par RolandG (Le 13/05/2020, à 15:25)
loup maigre (et vieux ...)
Hors ligne
#2 Le 13/05/2020, à 15:24
- RolandG
Re : [apache] module Server Side Inclusions (SSI) [résolu]
Pardon pour l'anglais, j'ai confondu avec un autre forum.
La réponse à ma question est :
Il suffit d'autoriser le module .load, comme tous les autres, par la commande :
a2enmod include.load
et relancer apache par
sudo systemctl restart apache2
Merci de m'avoir laisser patauger (ce qui m'indique que la réponse est plus simple que je ne l'imagine ...)
à bientôt
loup maigre (et vieux ...)
Hors ligne