I want to improve security of my Apache webserver.
Open:
/etc/apache2/conf.d/security
Edit:
ServerTokens Prod ServerSignature Off
Reload/Restart:
/etc/init.d/apache2 reload /etc/init.d/apache2 restart
The values Prod and Off should be fine, but I get these errors:
ServerTokens takes one argument, Determine tokens displayed in the Server: header - Min(imal), OS or Full Action 'configtest' failed.
ServerSignature takes one argument, En-/disable server signature (on|off|email) Action 'configtest' failed.
Where do I find Apache's configtest declaration, so I can tell it to accept Prod and Off?
Problem solution:
I had inline comments in my config file, which are not allowed.
So do NOT do this:
ServerTokens Prod # Added this on 10/20/2012
Instead do it this way:
# Added this on 10/20/2012: ServerTokens Prod
However, the error messages confused me, since they only had three options (Min, OS and Full) and were all lower case (on|off|email) while in the config file there were more options and ucfirst.
configtest
in/etc/init.d/apache2
. It will run the commandapachectl configtest
. Then follow it from there.configtest
command is telling you that you have a syntax error in your configuration file. You do not need to fixconfigtest
, you need to fix the errors which configtest is showing you.