Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Download directory protection with HTTP Basic Auth?

Good day!

Is it possible to protect download directory (used for package deployment in OCS) with password (HTTP Basic Auth)?
in Package deployment by (130 points)

1 Answer

+1 vote
I could never get the basic http auth to work for the linux agent. It would never contact. It was easier just to disable http access via web browser, so only https can be done.

You can try if you like:

To add basic auth:

$htpasswd -c  /etc/apache2/htpasswd.users company


$nano /etc/apache2/conf.d/z-ocsinventory-server.conf

Uncomment these lines and add correct password file

AuthType Basic

AuthName "OCS Inventory

AuthUserFile "/etc/apache2/htpasswd.users"

require valid-user

To disable http

$nano /etc/apache2/conf.d/ocsinventory-reports.conf

Uncomment following to force use of HTTPS in Administration Server


And then you will want to force the security of the http footer. Change “ServerTokens” to “Prod” in the file:

$nano /etc/apache2/conf.d/security
by (360 points)
edited by
Thank for your answer! I tried basic auth for deployment.

On Windows agents it works perfect, but with basic auth on Linux deployment stop working.

If we disable http for deployment it will work? As we see deployment use both https (for info download) and http (for pakage download)? How disabling http will prevent acces to download packages via internet browser?
So the trick is to disable http only for the web page access. http is still needed for deployment. And yes, Basic Auth did not work for our Linux agents either.
Powered by Question2Answer