I have an Apache/2.4.18 server in Ubuntu 16.04 with PHP 7.0. I wanted to add in /etc/apache2./apache2.conf the following:
Header set X-XSS-Protection "1; mode=block"
I have read that i must install mod_headers.c
and to do the commands are:
a2enmod headers
sudo /etc/init.d/apache2 restart
Although when i do apache2 -l
Compiled in modules:
core.c
mod_so.c
mod_watchdog.c
http_core.c
mod_log_config.c
mod_logio.c
mod_version.c
mod_unixd.c
so mod_headers.c
still does not exist.. What am i doing wrong here?
Best Answer
a2enmod
will activate a dynamically loaded module.apache2 -l
lists only modules statically compiled into the apache2 binary.man apache2
reveals:You can list all modules with this:
If the module is loaded, the output should include this line: